Skip to content

Instantly share code, notes, and snippets.

@uploadcare-user
Created September 19, 2018 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uploadcare-user/ed0c052a57e81384386e525ecdf5b009 to your computer and use it in GitHub Desktop.
Save uploadcare-user/ed0c052a57e81384386e525ecdf5b009 to your computer and use it in GitHub Desktop.
Basic responsive image example using `srcset` and `sizes`
<img src="cat.jpg"
alt="Example Cat"
srcset="cat-600.jpg 600w,
cat-1200.jpg 1200w,
cat-1800.jpg 1800w,
cat-2400.jpg 2400w"
sizes="(min-width: 1600px) 33vw,
(min-width: 900px) 50vw,
90vw">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment