Change record status: 
Project: 
Introduced in branch: 
11.1.x
Introduced in version: 
11.1.0
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