Commit 427045e1 authored by Berdir's avatar Berdir Committed by woprrr

Issue #2868638 by Berdir, woprrr: CropEffect::transformDimensions() reads the...

Issue #2868638 by Berdir, woprrr: CropEffect::transformDimensions() reads the file from disk, which is slow
parent 71eea5ff
......@@ -181,11 +181,7 @@ class CropEffect extends ConfigurableImageEffectBase implements ContainerFactory
* {@inheritdoc}
*/
public function transformDimensions(array &$dimensions, $uri) {
/** @var \Drupal\Core\Image\Image $image */
$image = $this->imageFactory->get($uri);
/** @var \Drupal\crop\CropInterface $crop */
$crop = $this->getCrop($image);
$crop = Crop::findCrop($uri, $this->configuration['crop_type']);
if (!$crop instanceof CropInterface) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment