diff --git a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php index edb9ea6..1973bed 100644 --- a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php +++ b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php @@ -112,10 +112,10 @@ public function viewElements(FieldItemListInterface $items, $langcode) { $image_uri = $image->getFileUri(); $url = $image_style ? $image_style->buildUrl($image_uri) : file_create_url($image_uri); - // Add cacheable metadata from the image and image style. - $cacheable_metadata = CacheableMetadata::createFromObject($image); + // Add cacheability metadata from the image and image style. + $cacheability = CacheableMetadata::createFromObject($image); if ($image_style) { - $cacheable_metadata->addCacheableDependency(CacheableMetadata::createFromObject($image_style)); + $cacheability->addCacheableDependency(CacheableMetadata::createFromObject($image_style)); } if ($settings['url_link']) { @@ -134,7 +134,7 @@ public function viewElements(FieldItemListInterface $items, $langcode) { // Plain text URL. $elements[$delta] = ['#markup' => $url]; } - $cacheable_metadata->applyTo($elements[$delta]); + $cacheability->applyTo($elements[$delta]); } return $elements;