Open redbotHQ opened 8 months ago
I too am experiencing this, which means I either have to disable Imagify, or manually adjust each image to use the original path. I can confirm the patch suggested by @redbotHQ works too. It would be good if someone from the team could prioritise this for an update seeing as a fix is available. @Mai-Saad
Describe the bug WebP generation of rotated JPG files results in wrong orientation.
To Reproduce
Expected behavior The WebP file would be rotated as per the JPG equivalent.
Screenshots https://redbot.uk/imagify-bug-demo.html
Additional context On upload Wordpress rotates the JPG image via the maybe_exif_rotate() function, appending '-rotated' to the filename, before updating metadata orientation to 1.
Imagify generates the 'full' size WebP file from the backup path, but does not replicate the rotation of the file performed on the raw fullsize path by Wordpress.
Bug Fix The bug can be patched by adding the following code to the start of the optimize() function within file: /imagify/classes/Optimization/File.php