在Nginx中配置image filter模块来实现动态生成缩略图

2019-10-17 19:54:35王振洲
location ~ ^/test/(.*)$ {
      image_filter size;
      root  /var/www/_xxx;
      index index.html index.htm;
    }

输出信息类似:

{ "img" : { "width": 1024, "height": 537, "type": "jpeg" } }

是一个JSON,压力测试了一下,还是很给力,500个并发,CPU占用在17%左右。