Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Picture element with different image formats

View gist:2509735
1 2 3 4 5 6 7 8 9 10 11 12 13
<picture alt="Alt tag describing the image represented">
<source src="photo.webp" type="image/webp"/>
<source src="photo.mng" type="image/mng"/>
<source src="photo.svg" type="image/svg+xml"/>
<img src="photo-s.jpg" />
</picture>
 
// Notes
//----------------------------------------------------------------
If browser supported the webp image format it would use that image,
otherwise use the next image format in the source order. If the browser
does not support any of the image formats in the source elements, it would
default back to using the img element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.