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
Serving WebP images via content negotiation
Search
Szymon Nowak
November 04, 2015
Programming
1
78
Serving WebP images via content negotiation
Lightning talk from meet.js meetup 11/2015
Szymon Nowak
November 04, 2015
Tweet
Share
More Decks by Szymon Nowak
See All by Szymon Nowak
meet.js Katowice - ES6 Promises 101
szimek
1
230
GDG DevFest 2015 Poland - How to grow your own Babel fish
szimek
0
61
JSConf EU 2015 - How to grow your own Babel fish
szimek
0
330
Other Decks in Programming
See All in Programming
為你自己學 Python - 冷知識篇
eddie
1
330
Updates on MLS on Ruby (and maybe more)
sylph01
1
170
rage against annotate_predecessor
junk0612
0
150
時間軸から考えるTerraformを使う理由と留意点
fufuhu
9
3.8k
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
260
TanStack DB ~状態管理の新しい考え方~
bmthd
2
410
KessokuでDIでもgoroutineを活用する / Go Connect #6
mazrean
0
140
パスタの技術
yusukebe
1
560
print("Hello, World")
eddie
1
290
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
2
210
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
300
DockerからECSへ 〜 AWSの海に出る前に知っておきたいこと 〜
ota1022
5
1.9k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
279
23k
Designing for humans not robots
tammielis
253
25k
GitHub's CSS Performance
jonrohan
1032
460k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
It's Worth the Effort
3n
187
28k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Six Lessons from altMBA
skipperchong
28
4k
The Language of Interfaces
destraynor
160
25k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
830
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
GraphQLとの向き合い方2022年版
quramy
49
14k
Transcript
SERVING WEBP IMAGES VIA CONTENT NEGOTIATION SZYMON NOWAK @SZIMEK
366K
[email protected]
248K
[email protected]
198K
[email protected]
81K
[email protected]
173K
[email protected]
81K
[email protected]
FIREFOX Accept: image/png,image/*;q=0.8,*/*;q=0.5
CHROME Accept: image/webp,image/*,*/*;q=0.8
NGINX if ($http_accept ~* "webp") { set $webp_accept "true"; }
NGINX if ($webp_accept = "true") { rewrite (.*) $1.webp break;
}
NGINX add_header Vary Accept;
https://www.igvita.com/2013/05/01/deploying- webp-via-accept-content-negotiation/
OR USE PICTURE ELEMENT https://developer.mozilla.org/en-US/docs/Web/ HTML/Element/picture
OR USE SERVICE WORKERS http://deanhume.com/Home/BlogPost/service- workers--dynamic-responsive-images-using- webp-images/10132/