I am following the cookbook guide to generating responsive images. I have a setup similar to the one described here: Responsive images | Kirby CMS
I am just wondering, if I have a default srcset defined like in the example, which includes a width of 1800 and I use it with srcset="<?= $image->srcset() ?>", does kirby generate that version of the image if the image is only, say, 1000 px wide?
I’m thinking that if yes, I should probably include a check to see if the image is bigger than one of the intended srcset sizes. Is there a way to get them from within an image snippet?
Just so I understand correctly: let’s say I have a 1000 px wide image, and my srcset for thumbnails in my config.php includes a width of 768 px, 1440 px and 1920 px. Does this mean that three thumbnails will be created, one that’s 768 px wide, one that’s 1000 px wide, and another one that’s 1000 px wide?
Yes, I think so. I think you should make sure that your original images are large enough to create the sizes you want to render. In the end, using responsive images is not only about making sure that you don’t use images that are too large, but also to make sure that your images are not blurry if they are too tiny.