Closed drzraf closed 2 years ago
Yep, you’re totally right. Timmy can easily know about whether it should upscale an image or not. I started working on this, but it’s taking a little longer than expected.
Any news regarding this?
Hey @drzraf
I’m in the process of refactoring a lot of things, because it became harder to maintain the code with a function based approach where I repeat myself quite often. There will be a new 1.0 version, including the fix for this. I made good progress in the last two weeks, so you can expect a result soon.
Sorry for keeping you waiting :)
I just added the first beta for Timmy v1.0.0 that includes a fix for this: https://github.com/mindkomm/timmy/releases/tag/1.0.0-beta.1.
I tested it and it seems to work! That's a great change. Thank you
Great! Thanks for the feedback 👍😊
Timmy apparently lacks the checks about whether cropping/resizing would actually reduce (contrary to increase) an image during the
image_downsize
filter (Since neitherfilter_image_downsize
norresize()
contain theoversize
guards which only live insideget_image_params()
). That's one such trace I grabbed:uploads/2021/02/foo-3-mx.jpg
is actually1666x3000
and Timmy must know about this. Then it must not try to create an image larger than the initial one since it's has all the chances to end-up badly:web/wp/wp-includes/class-wp-image-editor-imagick.php
many filters would consume a bunch of memory on bigger images).