Closed markonikolic985 closed 2 years ago
I have an update on this, as I believe there is a new issue that's been brought to our attention that seems like it is closely related.
This user is on the free Starter plan and noticed that in cases where an original image is larger than 2MB in file size, the WebP version of the -scaled image is not being created even though the -scaled JPG/PNG version is optimized:
I was able to recreate this and can see the original file size of the -scaled.jpg image:
Is different than it is after optimization:
So I think that when it comes to the -scaled.jpg.webp version, Imagify is using the original to both test whether it is under the 2MB threshold for free accounts and also when it's created (since the dimensions end up being the same as the original image).
Further to @joejoe04 comments above (I am the user he mentions), here are my own test results:
In this case, both 'Resize [to 1024px]' and 'Create WebP' options are enabled on the Starter Plan.
Note that the scaled images (all 1024x575px and approximately the same file size e.g. ~150KB) are not actually being used for WebP conversion, instead the original images are used. The scaled images are tiny, and well under the 2MB max file size for the Starter Plan, but they all fail the WebP conversion with the same error. Note the file sizes mentioned in the error - these appear to correspond to the file sizes of the original images (red highlight).
The expected results are:
On resize, the original image should be of no consequence to WebP conversion - this file is now just a backup.
Plugin with 600,000+ active installs waiting 2 years for a solution also in paid version?
I was able to reproduce the issue. The original image is resized, but the WebP image isn't.
The root cause is in the maybe_resize() method of the Process class. What happens is the following:
A working solution is to check the dimensions using the file dimensions themselves instead of the dimensions stored in the database for the image.
effort [XS]
When using image resizing in Imagify, original image is resized to defined value, but WebP stays in original size (width/height).
To Reproduce
Expected behavior
WebP should be resized as same as the original format image.
Screenshots