diff -u b/core/modules/image/image.api.php b/core/modules/image/image.api.php --- b/core/modules/image/image.api.php +++ b/core/modules/image/image.api.php @@ -43,10 +43,10 @@ * * This hook allows modules to alter the uri of the derivative. By implementing * this hook, a module can decide, for example, that a specific image style will - * be available on a different schema. This hook is called when the image module - * builds the uri of an image derivative. + * be available on a different scheme. This hook is called when the image module + * builds the URI of an image derivative. * - * Note: If you use a special uri alteration that stores the image derivatives + * Note: If you use a special URI alteration that stores the image derivatives * outside of public://styles/{image_style}, private://styles/{image_style} or * even outside Drupal (for example, on a public image service like Flickr, * Instagram, etc.), you need to implement your own flush policy. Implementing @@ -63,7 +63,7 @@ * - image_style: The \Drupal\image\ImageStyleInterface image style object. */ function hook_image_style_uri_alter(&$uri, array $context) { - if (($name = $context['image_style']->id()) == 'watermarked_low_resolution') { + if (($name = $context['image_style']->id()) === 'watermarked_low_resolution') { $path = $context['path']; // Low resolution, watermarked images are available publicly, in the // public:// stream wrapper.