image icon indicating copy to clipboard operation
image copied to clipboard

How do I specify in <nuxt-picture> multiple formats from the backend?

Open vedmant opened this issue 3 years ago • 0 comments
trafficstars

Hi, I have an object from the backend that returns me image in multiple formats, like jpg, webp. I need then to create a tag like:

<picture>
  <source type="image/webp" :srcset="image.webp_format">
  <source type="image/jpeg" :srcset="image.jpg_format">
  <img :src="image.jpg_format" alt="">
</picture>

How I can do this with ?

I also want to be able to use lazy loading and preload features when needed.

vedmant avatar Oct 06 '22 17:10 vedmant