This is how you can easily make Nginx serving webp images if disponible & if browser support it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
## | |
# WebP conf | |
## | |
map $http_accept $webp_suffix { | |
default ""; | |
"~*webp" ".webp"; | |
} | |
## | |
# Minimal server | |
## | |
server { | |
[…] | |
location ~* ^/images/.+\.(png|jpe?g)$ { | |
root /home/www-data; | |
add_header Vary Accept; | |
try_files $uri$webp_suffix $uri =404; | |
} | |
} | |
} |
Commentaire sur “Nginx – webp”
Interested in hardrock? How about KISS? The band is on a tour this 2019 year all across USA. Visit http://prohibitionbar.cf/?p=10 to know more about KISS concert dates in 2019.