-
Notifications
You must be signed in to change notification settings - Fork 13
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
Don't render srcset paths that are bigger than the original image #33
Comments
We tweaked it a bit to prevent an empty srcset="" if the file is to small to provide even one srcset width. If this is interesting for anybody i can provide a PR... |
I like this idea. I'll create a PR with this. |
@mficzel could there be a case where someone would want to upscale an image beyond the asset image size? Then it would be necessary to add an allowUpscaling flag in the srcset function. @bweinzierl If we don't render srcset paths for generated images bigger than the original, then we would also need to implement this functionality for the |
@bweinzierl Could you have a look at my PR #70? Would this solve your use case? |
@manuelmeister I tested your PR and it solves our usecase perfectly. |
# Conflicts: # Resources/Private/Fusion/Prototypes/Picture.fusion # Resources/Private/Fusion/Prototypes/Source.fusion
@bweinzierl I removed the preserveAspect part to #77. Could you have a look as well there? |
* main: TASK: Make BaseUri argument nullable in DummyImageSource constructor # Conflicts: # Classes/Domain/DummyImageSource.php
FEATURE: Only output existing images and allow upscaling
When the editor uses a small image and the fusion code has bigger sizes defined in the srcset property they are added to the srcset html attribute.
In our project we had strange effects because the browser was expecting an image with a specific width (as defined in srcset) but got an image with a different width than specified. The image in our case was not even upscaled. But even if it were it would make no sense to upscale an image.
This patch fixed the problem for us:
kaleidoscope-remove-upscaled-srcsets.patch.txt
The text was updated successfully, but these errors were encountered: