<picture> / srcset
Hi, just interested for those who take care of responsiveness as part of your workflow if your team uses <picture> or srcset for image distribution between devices.
I've noticed that most websites these days are 50/50 on whether these use <picture>.
If your team does do you handle it, or does your CMS handle it?
2 Replies
it depends:
- wordpress automatically outputs everything using srcset
- if i need to change sizes on-the-fly, i use <picture>
- if i need a parent element for the <img>, i use <picture>
<picture>
is generally used for "art direction", where you are using different images (maybe different aspect ratios, for example) at different breakpoitns. srcset is for a single image where you want to provide different resolutions, but it's always the same image.