Returns the image factory.
\Drupal\Core\Image\ImageFactory The image factory.
protected function getImageFactory() { return \Drupal::service('image.factory'); }