Skip to content

lengyuxuan/ngx_http_webp_filter_module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

require libwebp

cd /path/nginx-1.22.1

./configure --add-module=/path/libwebp/src
make -j
make install

Usage

edit nginx.conf

server {
  listen 8080;
  location ~* /(.+)\.webp@(\d+)$ {
    get_frame $2;
    webp_enable on;
    try_files /$1.webp /usr/share/nginx/html/404.html;
    root /path;
  }
}
nginx -t
nginx -s reload

curl http://localhost:8080/test.webp@1
# return /path/test.webp first frame

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages