New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Srcset no longer generates transforms larger than base transform with upscaleImages disabled #7352
Comments
To provide a bit more context, let's take an image that's 100x100 pixels. Normally if I were to request that 100x100 image to be 500x500 image it would upscale that image, increasing its file size and providing me with a perfect 500x500 stretched(/pixelated?) image. Which depending on the CSS could be useful but in my scenario totally unnecessary since I can counter smaller image resolutions with some simple CSS, saving precious bandwidth. With the possibility of setting Using srcset I expect this same behaviour. Lets say from that base 100x100 image I create a transform to 50x50, it would downscale that image to the desired resolution. However if I request an x2 on the same transform I expect srcset to generate me an image of 100x100 (which is still <= source image resolution). Normally if I were to then request an x3 image it would generate a 150x150, but with Let me know if this is clear and whether or not this is something that can be supported! |
I'm unable to reproduce this on my end. I'll follow up over Discord and report back. |
All fixed up for the next release. Thanks for reporting this! |
Craft 3.5.18 is out now with that fix ✨ |
Description
Encountered this bug in two fully unrelated projects after updating from 3.5.16 to 3.5.17.1. Both projects have
upscaleImages
disabled in thegeneral.php
, which I believe is the cause of this issue. Enabling upscaling would fix the srcset.The image it is trying to transform is way larger than the resolution we need, so x2 should work.
Steps to reproduce
Example:
Generated the following in 3.5.16
However after updating to 3.5.17.1 it provides the following and no longer upscale our srcset:
Additional info
The text was updated successfully, but these errors were encountered: