@towebperf
Tweet!
#towebperf
!
!
DAVID NEWTON (@NEWTRON)
RESPONSIVE IMAGES
BLAKE CROSBY (@BLAKECROSBY)
THE IMPORTANCE OF A CDN
HELLO!
& Review!
Slide 2
Slide 2 text
Improving Performance
with Responsive Images
Toronto Web Performance Group
January 22, 2014
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
–Brad Frost
“Good performance is good design”
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
No content
Slide 7
Slide 7 text
No content
Slide 8
Slide 8 text
–Anand Giridharadas, New York Times, April 10 2010
“More human beings today have access to a
cellphone than the United Nations says have
access to a clean toilet.”
Slide 9
Slide 9 text
–Anand Giridharadas, New York Times, April 10 2010
“More human beings today have access to a
cellphone than the United Nations says have
access to a clean toilet.”
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
1. A flexible, grid-based layout,
2. Flexible images and media, and
3. Media queries, a module from the CSS3
specification
Slide 13
Slide 13 text
1. A flexible, grid-based layout,
2. Flexible images and media, and
3. Media queries, a module from the CSS3
specification
Slide 14
Slide 14 text
img {
max-width: 100%;
}
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
No content
Slide 17
Slide 17 text
A solution
Serve one big image and
let the browser scale it
Slide 18
Slide 18 text
No content
Slide 19
Slide 19 text
No content
Slide 20
Slide 20 text
• Average web page size: 1,681 KB
• Images account for 1,031 KB, over 61% of total
!
HTTP Archive, January 15 2014
Slide 21
Slide 21 text
2x resolution = 4x as many pixels
Slide 22
Slide 22 text
–Brad Frost
“Good performance is good design”
Slide 23
Slide 23 text
A better solution
Serve an appropriately-sized image
to each user