Create a gist now

Instantly share code, notes, and snippets.

Picture element type attribute example
<picture alt="">
<!-- If browser supports WebP, use image below: -->
<source src="fullsize.webp" type="image/webp">
<!-- Else, use image from which ever source tag currently matches -->
<source src="mobile.jpg">
<source src="medium.jpg" media="min-width: 600px">
<source src="fullsize.jpg" media="min-width: 900px">
<img src="mobile.jpg">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment