old-school 90s animated gif

Pardon my dust! I just migrated my website to the fantastic Eleventy and am recording the redesign process of adopting my design system for our AI & Design Systems course.

Responsive Images
Responsive Images

There's three topics I avoid discussing: religion, politics, and responsive images. But now that the responsive images dust is settling, I figured it's time to face the music and actually learn this stuff.

So here's how I'm going to write the majority of my responsive images:

<img src="

That's it. See a demo.

My biggest priority is avoiding sending gigantic images to small screens, and this does the trick. The [smallwidth] and [largewidth] are the widths of the image assets, which'll change per use case. I'll use the Picturefill polyfill to make it all work. Most of my images won't need swapped out, just the big honkin' hero image types.

I could further explain this, but in an effort to keep things simple I'll stop writing now.

Update: I've updated this post to reflect the suggestion to include the sizes attribute in the markup.

Brad Frost Hey there! Brad Frost brad@bradfrost.com

I'm Brad Frost, an independent creator, web designer & developer, teacher, speaker, writer, musician, and artist based in Pittsburgh, PA.

Check out my courses AI & Design Systems course Atomic Design Certification Course Subatomic: The Complete Guide to Design Tokens course Get my newsletter

I like connecting with people directly without algorithms and machines getting in the way, and my newsletter helps me do that. Subscribe to get my latest thinking and interesting links about design, technology, music, art, creativity, and some random fun along the way.

Around the web