Responsive PNG doesn't seem optimal #3271
Unanswered
stuartcusackie
asked this question in
Ideas
Replies: 1 comment
-
Feel free to PR improvements around this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I am using the withResponsiveImages() method and the default with calculator on a transparent PNG, which is 1000 pixels wide.
The markup that is being produced doesn't seem very well optimised. Only three sizes are generated with the smallest being 699 pixels wide and 20kb:
<img srcset="https://ams3.digitaloceanspaces.com/spacenamex/media/8/responsive-images/image1test___default_1000_281.png 1000w, https://ams3.digitaloceanspaces.com/spacenamex/media/8/responsive-images/image1test___default_836_235.png 836w, https://ams3.digitaloceanspaces.com/spacenamex/media/8/responsive-images/image1test___default_699_196.png 699w, data:image/svg+xml;base64,{REDACATEDSVGDATA} 32w" onload="window.requestAnimationFrame(function(){if(!(size=getBoundingClientRect().width))return;onload=null;sizes=Math.ceil(size/window.innerWidth*100)+'vw';});" sizes="20vw" src="https://ams3.digitaloceanspaces.com/spacenamex/media/8/conversions/image1test-default.png" width="1000" height="281">
Here's my Model definition:
My Jpegs seem fine and much smaller variations are generated.
Beta Was this translation helpful? Give feedback.
All reactions