- ivnish Kazakhstan
Same problem. I use imagemagick and the module rotating images twice:
- When image added to form image widget
- When node presave
When I use -strip I have wrong rotation because I also have file_validate_image_resolution
I added
// Remove EXIF.
$img = new Imagick($path); $img->stripImage(); $img->writeImage($path);
after
$image->save();
And now it works fine for me
- ivnish Kazakhstan
$image->getToolkit()->apply("autorotate")
doesn't work for me (function return FALSE)
- ivnish Kazakhstan
Topicstarter helps me in private messages. I installed imagemagick β module, but
$image->getToolkit()->apply
doesn't work. Needs to install imagick β module insteadIf you need to strip exif you can add code after autorotate
if ($image->getToolkit()->apply("strip")) { $image->save(); }
- πΊπΈUnited States chucksimply
-strip was the reason why images weren't being rotated correctly. Removed it, now working as it should. Drupal 10.2
- πΊπΈUnited States chucksimply
So it's not 100% solved. I originally had the -strip option under the Prepend arguments on the Image Toolkit page. Orientation remained incorrect.
I then removed the -strip option, and now all my image styles that convert to WEBP have the correct orientation. But without the convert, they still are incorrect.
This isn't really a solution, and I'm not sure what's going on. Still confused.
- πΊπΈUnited States chucksimply
Circling back on this issue... found a resolution.
This issue here π Orientation is no longer fixed if a maximum image resolution is set on the field RTBC fixes an issue where EXIF data was removed if Max Image Size constraints were defined and executed for an image upload.
Solution:
- Apply the patch from the related issue
- Add-strip
to Execution > Prepend arguments, just like in comments #5, #6, #7.Now ImageMagick and this module work as expected.
- π¬π§United Kingdom adamps
I now have a patch that hopefully fixes this issue and several others in π± Overall status Active . Please help to test and review.