nginx + image_filter_module + lua 处理图片(缩放、翻转)

        location ~ ^/([^_]+)_(\d+)x(\d+)\.(jpg|jpeg|png|gif)$ {
                set $true_uri /$1.$4;
                set $width $2;
                set $height $3;
                access_by_lua '
                    ngx.req.set_uri(ngx.var.true_uri)
                ';
                #image_filter test;
                image_filter resize $width $height;
                #image_filter rotate 90;
                #image_filter crop 100 100;
        }

演示地址: http://yii.nt00.com/upload/1/532c1704b9306_200x200.png