I always say, “If it looks like magic you probably don’t know what you’re doing”. Well, apparently I don’t know what I’m doing.
Webflow seems to use / generate responsive images when it feels like it.
To test this I made a simple 1 page / 1 image site.
I expected the img tag to look something like this (I stole this from another post about responsive images):
<img sizes="100vw"
src="http://.../image.jpg"
srcset="
http://.../image-p-500.jpeg 500w,
http://.../image-p-800.jpeg 800w,
http://.../image-p-1080.jpeg 1080w,
http://.../image-p-1600.jpeg 1600w,
http://.../image-p-2000.jpeg 2000w,
http://.../image-p-2600.jpeg 2600w,
http://.../image-p-3200.jpeg 3200w,
http://.../image.jpg 3840w
">
But instead this is the code I get when I export it:
<img class="responsiveimagetest" sizes="95vw"
src="images/5121-0_45.jpg"
srcset="images/5121-0_45.jpg 1080w,
images/5121-0_45.jpg 1600w,
images/5121-0_45.jpg 2000w,
images/5121-0_45.jpg 2600w,
images/5121-0_45.jpg 3200w,
images/5121-0_45.jpg 5184w">
-
Why doesn’t it actually “use” the p-1600, p-2000, p-2600… jpegs? It only uses the original .jpg. The files are available in the export.
-
Why doesn’t it generate the p-500, p-800, p-1080 sizes? I need those smaller images for the mobile screen sizes.
Here is the read-only link: https://preview.webflow.com/preview/berts-sublime-project?preview=4d576280e47448594d45f56091a60586
Here is the published version: http://berts-sublime-project.webflow.io/
Thank you in advance for any assistance,
Bert