| Q | A
| --- | ---
| Bug? | no
| New Feature? | yes
| Sulu Version | <= 1.6.20, dev-develop
| Browser Version | All
Currently the ImagineImageConverter doesn't use the Autorotate filter which takes exif data into consideration. So images won't rotate based on the exif data.
Rotate images based on the orientation of the picture
Add an image which uses a different rotation then the "default top-left" (see the test image)
Hook into the ImagineImageConverter and always add the rotation filter.
test-image.zip
seems like autorotate needs an additional PHP extension to read the exif data:
So think we will need to add the following:
private function autorotate(ImageInterface $image)
{
if (!ExifMetadataReader:isSupported) { // EDIT: seems like this check is not needed as it is done internal by imagine
return $image;
}
$autorotateFilter = new Autorotate();
return $autorotateFilter->apply($image);
}
and call this function before the image is resized e.g. after toRgb function.
/cc @sulu/core-team think nothing speaks again to add this to the ImagineImageConverter?
@alexander-schranz If you say so :-) @MichelFalke Would you have time to provide a PR?
@danrot I will
@MichelFalke you still want to contribute this. Hacktoberfest is the best time for it ;)
this issue is fixed in 1.6.23