image icon indicating copy to clipboard operation
image copied to clipboard

Multiple formats

Open CavalcanteLeo opened this issue 2 years ago • 2 comments

Avif is better than webp, but some of modern browser doesn't support avif yet, like safari.

Would be great if we could use multiple formats, something like:

 <nuxt-picture
    src="image.png"
    provider="static"
    format="avif,webp"
/>

then returns

<picture>
    <source srcset="image.avif" type="image/avif">
    <source srcset="image.webp" type="image/webp">
    <source srcset="image.png" type="image/png">
    <img src="image.png">
</picture>

this way, all modern browser will have the best options to display

CavalcanteLeo avatar Nov 03 '21 02:11 CavalcanteLeo

+1 for this. Really surprising it's not a feature yet, part of the benefit of picture over img is the ability to specify many formats, so being limited to 2 (preferred and fallback) for nuxt-picture really stinks.

realandrew avatar Aug 07 '22 20:08 realandrew

+1 isn't this implemented yet? This should be one of the most common usages when serving multiple formats from API.

vedmant avatar Oct 06 '22 15:10 vedmant

+1

agonzalez0515 avatar Dec 13 '22 18:12 agonzalez0515

+1

rekryt avatar Dec 21 '22 18:12 rekryt

same issue

agracia-foticos avatar Jun 05 '23 08:06 agracia-foticos

@pi0 have you seem this?

CavalcanteLeo avatar Jun 05 '23 08:06 CavalcanteLeo

finally 🚀👏🏼

CavalcanteLeo avatar Jun 10 '23 11:06 CavalcanteLeo