test webp
This commit is contained in:
@ -282,7 +282,7 @@ webp:
|
|||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
# The quality of the webp conversion 0 to 100 (where 100 is least lossy)
|
# The quality of the webp conversion 0 to 100 (where 100 is least lossy)
|
||||||
quality: 85
|
quality: 80
|
||||||
|
|
||||||
# List of directories containing images to optimize, nested directories will only be checked if `nested` is true
|
# List of directories containing images to optimize, nested directories will only be checked if `nested` is true
|
||||||
# By default the generator will search for a folder called `/img` under the site root and process all jpg, png and tiff image files found there.
|
# By default the generator will search for a folder called `/img` under the site root and process all jpg, png and tiff image files found there.
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
|
map $http_accept $webp_suffix {
|
||||||
|
default "";
|
||||||
|
"~*webp" ".webp";
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
|
location ~* \.(?:jpg|jpeg|png|webp)$ {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
try_files $uri$webp_suffix $uri = 404;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
Reference in New Issue
Block a user