Dear @izomar,
We have identified the cause of this and applied a fix in the development version that you can download below:
https://shortpixel.com/downloads/shortpixel-image-optimiser-5.1.6-DEV01.zip
In order to check if the issue is corrected, you’ll need to do the following (if backups were enabled, everything was significantly easier):
- Install the version above by going to Plugins -> Add New -> Upload and upload the new version on top of the previous one
- For the images where you see a wrong crop in the AVIF format, remove the corresponding AVIF file that is wrongly cropped using a file manager or via SFTP
- Add this piece of code in your site’s functions.php, or by using the Code Snippets plugin (it will enable a file check on disk, so the plugin can “see” the missing AVIF files that you just deleted):
add_filter('shortpixel/image/filecheck', function () { return true; });
- Then the plugin should identify that the AVIF files you deleted earlier are missing and will allow you to re-generate them, with the correct sizes this time.
Thanks for reporting this and please tell me if everything works fine with this version.