Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Responsive use of <img>
Search
Juga Paazmaya
February 10, 2015
Technology
0
180
Responsive use of <img>
A presentation held at [****] for Siili Solutions responsive design and prototyping team
Juga Paazmaya
February 10, 2015
Tweet
Share
More Decks by Juga Paazmaya
See All by Juga Paazmaya
Accessibility - Presented at TEKOS Workshop in 1st Sep 2022
paazmaya
0
93
CasperJS Workshop 2015-01-23
paazmaya
0
190
Windows Live sähköpostin käyttäminen Gmail-palvelun kautta
paazmaya
0
2.8k
jQuery - The new wave of JavaScript
paazmaya
0
93
Finland – Coming here and going there
paazmaya
1
55
Nanbudo - Nanbu Kata Book preview
paazmaya
0
880
Nice day for a walk
paazmaya
0
76
Valkoviiksi 7 makers
paazmaya
2
120
Other Decks in Technology
See All in Technology
Databricks Free Editionで始めるMLflow
taka_aki
0
730
30分でわかる!!『OCI で学ぶクラウドネイティブ実践 X 理論ガイド』
oracle4engineer
PRO
1
110
文字列操作の達人になる ~ Kotlinの文字列の便利な世界 ~ - Kotlin fest 2025
tomorrowkey
2
420
現場の壁を乗り越えて、 「計装注入」が拓く オブザーバビリティ / Beyond the Field Barriers: Instrumentation Injection and the Future of Observability
aoto
PRO
1
870
様々なファイルシステム
sat
PRO
0
290
オブザーバビリティと育てた ID管理・認証認可基盤の歩み / The Journey of an ID Management, Authentication, and Authorization Platform Nurtured with Observability
kaminashi
2
1.6k
GPUをつかってベクトル検索を扱う手法のお話し~NVIDIA cuVSとCAGRA~
fshuhe
0
350
LLM APIを2年間本番運用して苦労した話
ivry_presentationmaterials
8
2.7k
プロダクト開発と社内データ活用での、BI×AIの現在地 / Data_Findy
sansan_randd
1
770
猫でもわかるAmazon Q Developer CLI 解体新書
kentapapa
1
290
어떤 개발자가 되고 싶은가?
arawn
1
400
アノテーション作業書作成のGood Practice
cierpa0905
PRO
1
380
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
Raft: Consensus for Rubyists
vanstee
140
7.2k
The Pragmatic Product Professional
lauravandoore
36
7k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Facilitating Awesome Meetings
lara
57
6.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Building Adaptive Systems
keathley
44
2.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Testing 201, or: Great Expectations
jmmastey
46
7.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Transcript
Responsive use of
So far the images have been somewhat static
HTML 4 required to use src and alt
XHTML required a closure
HTML5 introduced new properties
Why not ?
srcset Descriptor defines the width of the image (w) or
the pixel ratio (x)
srcset width use case Usually used when the image has
dynamic size
srcset pixel density use case Usually used when the image
is used in a fixed layout
None
None
None
srcset - benefit & problem
sizes “If the srcset attribute is present, the sizes attribute
may also be present”
sizes examples First matched, first served. Default:
None
srcset & sizes - only benefit
Pixel density matters
3x
Quiz When srcset is unsupported by the given browser, which
image from the example markup below will be downloaded?
What problems does this bring? Duplication of media queries from
styles to markup, hence semantics mixed
What problems does this solve? Browser will download only the
images that are best fitting to the given use case, hence better use bandwidth
What problems does this solve? Developer can leave the calculations
of which image to use in a given case to the browser
Would you like to know more? Please see the talk
“Responsive images are coming to a browser near you” by Yoav Weiss at VelocityConf 2014 youtube.com/watch?v=GC3VgcltKKI
More further reading Please also see the in depth post
by Eric Portis about the topic: ericportis.com/posts/2014/srcset-sizes
Thank you I am Jukka Paasonen, a Responsive Consultant at
Siili Solutions