nginx配置图片动态裁剪
nginx 配置图片动态裁剪
location ~* /mintech/images/([0-9]+)x([0-9]+)_(.+) { alias $mintech_root_path/images/$3; set $img_width $1; set $img_height $2; image_filter resize $img_width $img_height; image_filter_jpeg_quality 95; image_filter_buffer 100M; }
示例:http://mintech.hebaocun.com/minTech/images/200x200_85e6217e-87db-4f90-bf2a-7c156fbe124b.jpg
配置动态裁剪功能需要nginx添加 --with-http_image_filter_module 模块