Skip to Content
Learning Responsive Web Design
book

Learning Responsive Web Design

by Clarissa Peterson
June 2014
Beginner
410 pages
9h 29m
English
O'Reilly Media, Inc.
Content preview from Learning Responsive Web Design

Chapter 6. Images

So far you’ve learned how to set up your web page, add some basic styles, and use media queries to adjust the layout depending on viewport width.

But your page is going to look quite boring until you get some images on it.

You’ve probably heard that there’s a lot of complexity around adding images to responsive websites. Images won’t always be displayed at the same size, because they’re flexible, so how do we make sure that we aren’t wasting bandwidth by sending a huge image to a device with a small screen?

And then how do we make sure we’re sending appropriate images to high-density (retina) screens?

This is one of the parts of responsive design that’s still being worked out. There are a few solutions that are in common use, which we’ll talk about here, but each has some drawbacks, and none of them seem like the perfect solution. It’s likely that there will be new ideas coming along in this area in the next couple of years that may change how we handle images on responsive websites.

In the meantime: start with the basics, which we’ll cover in this chapter. Optimize your images for the Web. Don’t use images when stylized text can do the same job, and use other solutions like icon fonts when appropriate. Make sure your images have good alternative (alt) text so they’re accessible to everybody.

When you’re deciding the best way to handle responsive images on your site, look at the different options and figure out what works for you. If you don’t implement a responsive ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning Responsive Web Design

Learning Responsive Web Design

Jennifer Kyrnin
The Responsive Web

The Responsive Web

Matthew Carver

Publisher Resources

ISBN: 9781449363659Errata Page