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
77
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
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
240
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
110
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
550
Java on Azure で LangGraph!
kohei3110
0
170
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
330
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
660
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
110
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
450
XP, Testing and ninja testing
m_seki
3
210
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
250
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
1.1k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Writing Fast Ruby
sferik
628
62k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Unsuck your backbone
ammeep
671
58k
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
A Modern Web Designer's Workflow
chriscoyier
694
190k
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/