Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MTDDC meetup Tokyo 2020 - 楽勝でこなすWebP対応

MTDDC meetup Tokyo 2020 - 楽勝でこなすWebP対応

Kunihiko Miyanaga

October 10, 2020
Tweet

More Decks by Kunihiko Miyanaga

Other Decks in Technology

Transcript

  1. LCP

  2. < ic e> < ce e="image/ eb " c e

    =" am le. eb " /> <img c=" am le. g" /> </ ic e> am le. g. eb am le. g
  3. c <? h if ( ($_SERVER['HTTP_ACCEPT'], 'image/ eb ') !==

    fal e): ?> <img c=" am le. eb " /> WebP <? h el e: ?> <img c=" am le. g" /> <? h e dif ?> Acce image/ eb Acce : e /h ml,a lica i / h ml+ ml,a lica i / ml; =0.9,image/ eb ,image/a g,*/*; =0.8
  4. am le. g am le. g. eb . acce Se

    E If Re e _URI "\.(j e?g g)$" _image_ e e Re i eE gi e O Re i eC d % HTTP_ACCEPT image/ eb Re i eC d % SCRIPT_FILENAME . eb -f Re i eR le .(j e?g g)$ % SCRIPT_FILENAME . eb [T=image/ eb ] Heade a e d Va Acce e =_image_ e e AddT e image/ eb . eb
  5. c ebp c eb - 75 -me ada a icc

    - ha _ - . eb i .j g c eb -l le -me ada a icc - . eb i . g