Canapin is experiencing an issue with image resizing on their forum, where some images are not being resized to the set dimensions (1920x1440 or 1920x1080 px), despite having a file size under 4 MB. Falco suggests that this issue may be due to client-side image optimization failing after the first image, particularly on iOS devices with high memory pressure. Canapin asks if there is a rake task or rails command to trigger a resize on images larger than the site settings.
In this message, all uploaded pictures but the first one have very large dimensions (probably haven’t been resized):
The file size is OK, < 4 MB as it should be, but when I try to upload similar resolution pictures from my computer or my smartphone, they’re all resized to 1920×1440 or 1920×1080 px whether the originals are more or less than 4 MB.
So, how the pictures in the linked post weren’t resized to 1920px width?
Note: the forum uses 2.9.0.beta4.
Looking at the 2.0.5.beta5 changelog, could it be related to one of these bugs fixes?
Allows image to be displayed at the right size
Ensure post_hotlinked_media index does not exceed size limit
If you look closely you will see that the first one on the post was resized and compressed just fine but the following ones weren’t. The client side image optimization happens on a best effort, if it fails it passes the original images back to the server.
I’ve seen this behavior of failing to compress images after the first one on iOS devices where memory pressure is high. Not much we can do IMO.
Just to know, is there a rake task or a rails command that could trigger a resize on images that are larger than the site setting (1920 width, 1920 height)?