Forum How do I...?

How does Prince parse the <img> srcset attribute?

Hey all,

I have images in my pages that look like this (formatted here for readability. URLs work if you want to see the images):

<img src=""
    srcset=" 300w, 600w, 1000w, 1500w, 3000w"

The srcset attribute defines a set of images that browsers can choose between based on the window's width. It's a mechanism to implement responsive images that's supported by most browsers today.

How can the Prince XML parser be asked to choose one of the images in the `srcset` attribute? Currently it uses the default image in `src`, which in our case and in most will be a low-quality image placeholder. I see that we can set a `@page size` CSS attribute, but that doesn't seem to translate to choosing an image within the srcset. Is this possible?

Prince does not currently support the srcset attribute, but we can add it to the roadmap.
That would be great. Thanks!