diff --git a/core/modules/image/image.admin.inc b/core/modules/image/image.admin.inc index bc5fe2b..b470cff 100644 --- a/core/modules/image/image.admin.inc +++ b/core/modules/image/image.admin.inc @@ -5,7 +5,6 @@ * Administration pages for image settings. */ -use Drupal\Core\Template\Attribute; use Drupal\Component\Utility\String; /** @@ -62,7 +61,7 @@ function theme_image_style_effects($variables) { } /** - * Prepare variables for image style preview templates. + * Prepares variables for image style preview templates. * * Default template: image-style-preview.html.twig. * @@ -159,76 +158,3 @@ function template_preprocess_image_anchor(&$variables) { ), ); } - -/** - * Prepares variables for image resize summary templates. - * - * Default template: image-resize-summary.html.twig. - * - * @param array $variables - * An associative array containing: - * - data: The current configuration for this resize effect. - */ -function template_preprocess_image_resize_summary(&$variables) { - $output = ''; - $data = $variables['data']; - - if ($data['width'] && $data['height']) { - $output = check_plain($data['width']) . 'x' . check_plain($data['height']); - } - else { - $output = ($data['width']) ? t('width @width', array('@width' => $data['width'])) : t('height @height', array('@height' => $data['height'])); - } - - if(isset($data['upscale'])) { - $output .= ' (' . t('upscaling allowed') . ')'; - } - - $variables['summary'] = $output; -} - -/** - * Prepares variables for image scale summary templates. - * - * Default template: image-scale-summary.html.twig. - * - * @param array $variables - * An associative array containing: - * - data: The current configuration for this scale effect. - */ -function template_preprocess_image_scale_summary(&$variables) { - $variables['summary'] = array( - '#theme' => 'image_resize_summary', - '#data' => $variables['data'], - ); -} - -/** - * Prepares variables for image crop summary templates. - * - * Default template: image-crop-summary.html.twig - * - * @param array $variables - * An associative array containing: - * - data: The current configuration for this crop effect. - */ -function template_preprocess_image_crop_summary(&$variables) { - $variables['summary'] = array( - '#theme' => 'image_resize_summary', - '#data' => $variables['data'], - ); -} - -/** - * Prepares varaibles for image rotate summary templates. - * - * Default template: image-rotate-summary-html-twig. - * - * @param array $variables - * An associative array containing: - * - data: The current configuration for this rotate effect. - */ -function template_preprocess_image_rotate_summary(&$variables) { - $data = $variables['data']; - $variables['summary'] = ($data['random']) ? t('random between -@degrees° and @degrees°', array('@degrees' => str_replace('-', '', $data['degrees']))) : t('@degrees°', array('@degrees' => $data['degrees'])); -} diff --git a/core/modules/image/image.field.inc b/core/modules/image/image.field.inc index 09400ed..c47c376 100644 --- a/core/modules/image/image.field.inc +++ b/core/modules/image/image.field.inc @@ -7,7 +7,6 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Template\Attribute; /** * Implements hook_field_info(). @@ -383,13 +382,13 @@ function _image_field_required_fields_validate($element, &$form_state) { } /** - * Prepare variables for image widget templates. + * Prepares variables for image widget templates. * * Default template: image-widget.html.twig. * * @param array $variables * An associative array containing: - * - element: An render element representing the image field widget. + * - element: A render element representing the image field widget. */ function template_preprocess_image_widget(&$variables) { $element = $variables['element']; @@ -404,8 +403,8 @@ function template_preprocess_image_widget(&$variables) { $element['file_' . $file->id()]['filename']['#suffix'] = ' (' . format_size($file->getSize()) . ') '; } - $variables['data'] = drupal_render_children($element); - $variables['attributes'] = new Attribute($element['#attributes']); + $variables['data'] = $element; + $variables['attributes'] = $element['#attributes']; } /** @@ -421,26 +420,33 @@ function template_preprocess_image_widget(&$variables) { */ function template_preprocess_image_formatter(&$variables) { $item = $variables['item']; + $variables['image'] = array(); // Do not output an empty 'title' attribute. - if (empty($item['title'])) { - unset($item['title']); + if (isset($item['title']) && drupal_strlen($item['title']) != 0) { + $variables['image']['#title'] = $item['title']; } if (isset($item['entity']) && empty($item['uri'])) { - $item['uri'] = $item['entity']->getFileUri(); + $variables['image']['#uri'] = $item['entity']->getFileUri(); + } + else { + $variables['image']['#uri'] = $item['uri']; } - $variables['image'] = array( - '#theme' => !empty($variables['image_style']) ? 'image_style' : 'image', - '#style_name' => !empty($variables['image_style']) ? $variables['image_style'] : NULL, - '#uri' => isset($item['uri']) ? $item['uri'] : NULL, - '#width' => isset($item['width']) ? $item['width']: NULL, - '#height' => isset($item['height']) ? $item['height']: NULL, - '#alt' => isset($item['alt']) ? $item['alt']: NULL, - '#title' => isset($item['title']) ? $item['title']: NULL, - '#attributes' => isset($item['attributes']) ? $item['attributes']: NULL, - ); + foreach (array('width', 'height', 'alt', 'attributes') as $key) { + if (isset($item[$key]) || array_key_exists($key, $item)) { + $variables['image']["#$key"] = $item[$key]; + } + } + + if ($variables['image_style']) { + $variables['image']['#theme'] = 'image_style'; + $variables['image']['#style_name'] = $variables['image_style']; + } + else { + $variables['image']['#theme'] = 'image'; + } // The link path and link options are both optional, but for the options to be // processed, the link path must at least be an empty string. diff --git a/core/modules/image/image.module b/core/modules/image/image.module index 4a4828c..95fc47b 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -13,7 +13,6 @@ use Drupal\image\Plugin\Core\Entity\ImageStyle; use Drupal\field\FieldInterface; use Drupal\field\FieldInstanceInterface; -use Drupal\Core\Template\Attribute; /** * Image style constant for user presets in the database. @@ -191,23 +190,19 @@ function image_theme() { 'template' => 'image-anchor', ), 'image_resize_summary' => array( - 'variables' => array('data' => NULL), - 'file' => 'image.admin.inc', + 'variables' => array('data' => NULL, 'effect' => array()), 'template' => 'image-resize-summary', ), 'image_scale_summary' => array( - 'variables' => array('data' => NULL), - 'file' => 'image.admin.inc', + 'variables' => array('data' => NULL, 'effect' => array()), 'template' => 'image-scale-summary', ), 'image_crop_summary' => array( - 'variables' => array('data' => NULL), - 'file' => 'image.admin.inc', + 'variables' => array('data' => NULL, 'effect' => array()), 'template' => 'image-crop-summary', ), 'image_rotate_summary' => array( - 'variables' => array('data' => NULL), - 'file' => 'image.admin.inc', + 'variables' => array('data' => NULL, 'effect' => array()), 'template' => 'image-rotate-summary', ), @@ -372,7 +367,7 @@ function image_style_options($include_empty = TRUE) { } /** - * Prepare variables for image style templates. + * Prepares variables for image style templates. * * Default template: image-style.html.twig. * diff --git a/core/modules/image/lib/Drupal/image/ImageEffectBase.php b/core/modules/image/lib/Drupal/image/ImageEffectBase.php index 2babe0d..c433bc9 100644 --- a/core/modules/image/lib/Drupal/image/ImageEffectBase.php +++ b/core/modules/image/lib/Drupal/image/ImageEffectBase.php @@ -50,6 +50,11 @@ public function transformDimensions(array &$dimensions) { public function getSummary() { return array( '#markup' => '', + '#effect' => array( + 'id' => $this->pluginDefinition['id'], + 'label' => $this->label(), + 'description' => $this->pluginDefinition['description'], + ), ); } diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php index 11f228e..cb022c5 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php @@ -44,10 +44,14 @@ public function applyEffect($image) { * {@inheritdoc} */ public function getSummary() { - return array( + $summary = array( '#theme' => 'image_crop_summary', '#data' => $this->configuration, ); + $summary += parent::getSummary(); + $summary['#data']['anchor_label'] = self::getAnchorOptions($this->configuration['anchor']); + + return $summary; } /** @@ -63,17 +67,7 @@ public function getForm() { $form['anchor'] = array( '#type' => 'radios', '#title' => t('Anchor'), - '#options' => array( - 'left-top' => t('Top') . ' ' . t('Left'), - 'center-top' => t('Top') . ' ' . t('Center'), - 'right-top' => t('Top') . ' ' . t('Right'), - 'left-center' => t('Center') . ' ' . t('Left'), - 'center-center' => t('Center'), - 'right-center' => t('Center') . ' ' . t('Right'), - 'left-bottom' => t('Bottom') . ' ' . t('Left'), - 'center-bottom' => t('Bottom') . ' ' . t('Center'), - 'right-bottom' => t('Bottom') . ' ' . t('Right'), - ), + '#options' => self::getAnchorOptions(), '#theme' => 'image_anchor', '#default_value' => $this->configuration['anchor'], '#description' => t('The part of the image that will be retained during the crop.'), @@ -81,4 +75,31 @@ public function getForm() { return $form; } + /** + * Builds a list of anchor options. + * + * @var string $anchor + * (optional) If provided, only the label of this anchor will be returned. + * + * @return array|string + * A list of anchor options or an anchor label if $anchor has been provided. + */ + static protected function getAnchorOptions($anchor = NULL) { + $anchors = array( + 'left-top' => t('Top') . ' ' . t('Left'), + 'center-top' => t('Top') . ' ' . t('Center'), + 'right-top' => t('Top') . ' ' . t('Right'), + 'left-center' => t('Center') . ' ' . t('Left'), + 'center-center' => t('Center'), + 'right-center' => t('Center') . ' ' . t('Right'), + 'left-bottom' => t('Bottom') . ' ' . t('Left'), + 'center-bottom' => t('Bottom') . ' ' . t('Center'), + 'right-bottom' => t('Bottom') . ' ' . t('Right'), + ); + if (empty($anchor)) { + return $anchors; + } + return isset($anchors[$anchor]) ? $anchors[$anchor] : NULL; + } + } diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php index 484e6a0..674ed27 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php @@ -47,10 +47,14 @@ public function transformDimensions(array &$dimensions) { * {@inheritdoc} */ public function getSummary() { - return array( + $summary = parent::getSummary(); + unset($summary['#markup']); + $summary += array( '#theme' => 'image_resize_summary', '#data' => $this->configuration, ); + + return $summary; } /** diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php index dee537e..05c92f1 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php @@ -82,10 +82,13 @@ public function transformDimensions(array &$dimensions) { * {@inheritdoc} */ public function getSummary() { - return array( + $summary = array( '#theme' => 'image_rotate_summary', '#data' => $this->configuration, ); + $summary += parent::getSummary(); + + return $summary; } /** diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php index 47ada5a..028eb7f 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php @@ -53,10 +53,13 @@ public function transformDimensions(array &$dimensions) { * {@inheritdoc} */ public function getSummary() { - return array( + $summary = array( '#theme' => 'image_scale_summary', '#data' => $this->configuration, ); + $summary += parent::getSummary(); + + return $summary; } /** diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php index e255edc..9815766 100644 --- a/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php +++ b/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php @@ -34,7 +34,7 @@ public static function getInfo() { /** * Test styled image dimensions cumulatively. */ - function testImageDimensions() { + public function testImageDimensions() { // Create a working copy of the file. $files = $this->drupalGetTestFiles('image'); $file = reset($files); @@ -47,15 +47,16 @@ function testImageDimensions() { $url = $style->buildUrl($original_uri); $variables = array( - 'style_name' => 'test', - 'uri' => $original_uri, - 'width' => 40, - 'height' => 20, + '#theme' => 'image_style', + '#style_name' => 'test', + '#uri' => $original_uri, + '#width' => 40, + '#height' => 20, ); // Verify that the original image matches the hard-coded values. $image_info = image_get_info($original_uri); - $this->assertEqual($image_info['width'], $variables['width']); - $this->assertEqual($image_info['height'], $variables['height']); + $this->assertEqual($image_info['width'], $variables['#width']); + $this->assertEqual($image_info['height'], $variables['#height']); // Scale an image that is wider than it is high. $effect = array( @@ -69,8 +70,7 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -90,8 +90,7 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -112,8 +111,7 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -134,8 +132,7 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -152,8 +149,7 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -173,8 +169,7 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -193,8 +188,7 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -214,8 +208,7 @@ function testImageDimensions() { ); $effect_id = $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.'); $this->drupalGet($url); $this->assertResponse(200, 'Image was generated at the URL.'); @@ -233,7 +226,20 @@ function testImageDimensions() { ); $style->saveImageEffect($effect); - $img_tag = theme('image_style', $variables); - $this->assertEqual($img_tag, ''); + $this->assertEqual($this->getImageTag($variables), ''); } + + /** + * Render an image style element. + * + * drupal_render() alters the passed $variables array by adding a new key + * '#printed' => TRUE. This prevents next call to re-render the element. We + * wrapping drupal_render() in a helper protected method and pass each time a + * fresh so that $variables won't get altered and the element is re-rendered + * each time. + */ + protected function getImageTag($variables) { + return drupal_render($variables); + } + } diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php index 923b75d..b30e1d0 100644 --- a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php +++ b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php @@ -107,7 +107,7 @@ function _testImageFieldFormatters($scheme) { ':path' => url('node/' . $nid), ':url' => file_create_url($image_info['uri']), ':width' => $image_info['width'], - ':height' => $image_info['height'] + ':height' => $image_info['height'], ) ); $this->assertEqual(count($elements), 1, 'Image linked to content formatter displaying correctly on full node view.'); diff --git a/core/modules/image/templates/image-anchor.html.twig b/core/modules/image/templates/image-anchor.html.twig index f97aabf..eb670a4 100644 --- a/core/modules/image/templates/image-anchor.html.twig +++ b/core/modules/image/templates/image-anchor.html.twig @@ -6,7 +6,6 @@ * Available variables: * - table: HTML for the table of image anchors. * - * @see template_preprocess() * @see template_preprocess_image_anchor() * * @ingroup themeable diff --git a/core/modules/image/templates/image-crop-summary.html.twig b/core/modules/image/templates/image-crop-summary.html.twig index 16fea65..37c5f7c 100644 --- a/core/modules/image/templates/image-crop-summary.html.twig +++ b/core/modules/image/templates/image-crop-summary.html.twig @@ -4,12 +4,24 @@ * Default theme implementation for a summary of an image crop effect. * * Available variables: - * - summary: The current configuration for this crop effect. + * - data: The current configuration for this resize effect, including: + * - width: The with of the resized image. + * - height: The height of the resized image. + * - anchor: The part of the image that retained during the crop. + * - anchor_label: The translated label of the crop anchor. + * - effect: The effect information, including: + * - id: The effect identifier. + * - label: The effect name. + * - description: The effect description. * - * @see template_preprocess() * @see template_preprocess_image_crop_summary() * * @ingroup themeable */ #} -{{ summary }} +{% spaceless %} + {{ data.width }}x{{ data.height }} + {% trans %} + (anchor {{ data.anchor_label }}) + {% endtrans %} +{% endspaceless %} diff --git a/core/modules/image/templates/image-resize-summary.html.twig b/core/modules/image/templates/image-resize-summary.html.twig index 27db6d8..fd628d1 100644 --- a/core/modules/image/templates/image-resize-summary.html.twig +++ b/core/modules/image/templates/image-resize-summary.html.twig @@ -4,12 +4,17 @@ * Default theme implementation for a summary of an image resize effect. * * Available variables: - * - summary: The current configuration for this resize effect. + * - data: The current configuration for this resize effect, including: + * - width: The with of the resized image. + * - height: The height of the resized image. + * - effect: The effect information, including: + * - id: The effect identifier. + * - label: The effect name. + * - description: The effect description. * - * @see template_preprocess() * @see template_preprocess_image_resize_summary() * * @ingroup themeable */ #} -{{ summary }} +{{ data.width }}x{{ data.height }} diff --git a/core/modules/image/templates/image-rotate-summary.html.twig b/core/modules/image/templates/image-rotate-summary.html.twig index e385923..9c16bf2 100644 --- a/core/modules/image/templates/image-rotate-summary.html.twig +++ b/core/modules/image/templates/image-rotate-summary.html.twig @@ -4,12 +4,26 @@ * Default theme implementation for a summary of an image rotate effect. * * Available variables: - * - summary: The current configuration for this rotate effect. + * - data: The current configuration for this resize effect, including: + * - degrees: Image rotation. Positive clockwise, negative counter-clockwise. + * - bgcolor: The background color of the exposed areas of the image, as hex. + * - random: If the rotation angle is randomized. + * - effect: The effect information, including: + * - id: The effect identifier. + * - label: The effect name. + * - description: The effect description. * - * @see template_preprocess() * @see template_preprocess_image_rotate_summary() * * @ingroup themeable */ #} -{{ summary }} +{% spaceless %} + {% if data.random %} + {% trans %} + random between -{{ data.degrees|abs }}° and {{ data.degrees|abs }}° + {% endtrans %} + {% else %} + {{ data.degrees }}° + {% endif %} +{% endspaceless %} diff --git a/core/modules/image/templates/image-scale-summary.html.twig b/core/modules/image/templates/image-scale-summary.html.twig index 4370529..0bfac24 100644 --- a/core/modules/image/templates/image-scale-summary.html.twig +++ b/core/modules/image/templates/image-scale-summary.html.twig @@ -4,12 +4,38 @@ * Default theme implementation for a summary of an image scale effect. * * Available variables: - * - summary: The current configuration for this scale effect. + * - data: The current configuration for this resize effect, including: + * - width: The with of the resized image. + * - height: The height of the resized image. + * - upscale: If images larger than their original size can scale. + * - effect: The effect information, including: + * - id: The effect identifier. + * - label: The effect name. + * - description: The effect description. * - * @see template_preprocess() * @see template_preprocess_image_scale_summary() * * @ingroup themeable */ #} -{{ summary }} +{% spaceless %} + {% if data.width and data.height %} + {{ data.width }}x{{ data.height }} + {% else %} + {% if data.width %} + {% trans %} + width {{ data.width }} + {% endtrans %} + {% elseif data.height %} + {% trans %} + height {{ data.height }} + {% endtrans %} + {% endif %} + {% endif %} + + {% if data.upscale %} + {% trans %} + (upscaling allowed) + {% endtrans %} + {% endif %} +{% endspaceless %} diff --git a/core/modules/image/templates/image-style-preview.html.twig b/core/modules/image/templates/image-style-preview.html.twig index 9df1820..1f52a67 100644 --- a/core/modules/image/templates/image-style-preview.html.twig +++ b/core/modules/image/templates/image-style-preview.html.twig @@ -19,7 +19,6 @@ * - attributes: HTML sample attributes for the derivative style. * - rendered: The rendered derivative image. * - * @see template_preprocess() * @see template_preprocess_image_style_preview() * * @ingroup themeable diff --git a/core/modules/image/templates/image-style.html.twig b/core/modules/image/templates/image-style.html.twig index cb2757e..9a24420 100644 --- a/core/modules/image/templates/image-style.html.twig +++ b/core/modules/image/templates/image-style.html.twig @@ -21,11 +21,9 @@ * http://www.w3.org/TR/xhtml1/dtds.html * http://dev.w3.org/html5/spec/Overview.html#alt * - * @see template_preprocess() * @see template_preprocess_image_style() * * @ingroup themeable */ #} -{# @todo Remove and consolidate with image: http://drupal.org/node/1804614 #} {% spaceless %}{{ image }}{% endspaceless %} diff --git a/core/modules/image/templates/image-widget.html.twig b/core/modules/image/templates/image-widget.html.twig index c186ba6..99e14e1 100644 --- a/core/modules/image/templates/image-widget.html.twig +++ b/core/modules/image/templates/image-widget.html.twig @@ -8,7 +8,6 @@ * - preview: A rendered preview image. * - data: Render elements of image data. * - * @see template_preprocess() * @see template_preprocess_image_widget() * * @ingroup themeable