By mondrake on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.1.x
Introduced in version:
11.1.0
Issue links:
Description:
image_filter_keyword() is deprecated.
Use \Drupal\Component\Utility\Image::getKeywordOffset() instead.
Note that if the keyword is not recognized (i.e. not one of 'top', 'bottom', 'center', 'right', 'left'), the new method throws an InvalidArgumentException instead of returning the invalid keyword itself.
BEFORE:
$x = image_filter_keyword($x, $image->getWidth(), $this->configuration['width']);
AFTER:
use Drupal\Component\Utility\Image;
...
$x = Image::getKeywordOffset($x, $image->getWidth(), $this->configuration['width']);
...
Impacts:
Module developers