Use the WebP version of converted PNG/JPEG images
This commit is contained in:
parent
154784387a
commit
8e62c19fca
@ -8,6 +8,12 @@ location ~* \.(?:rss|atom)$ {
|
||||
expires 1h;
|
||||
}
|
||||
|
||||
# Use the WebP version of converted PNG/JPEG images
|
||||
location ~* ^.+\.(png|jpe?g)$ {
|
||||
add_header Vary Accept;
|
||||
try_files $uri$webp_suffix $uri =404;
|
||||
}
|
||||
|
||||
# Caches images, icons, video, audio, HTC, etc.
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc|webp)$ {
|
||||
expires 1y;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user