location ~* (.*\.(jpg|gif|png))_(.*)x(.*)$ {

    set $width      $3;

    set $height     $4;

    rewrite "(.*\.(jpg|gif|png))(.*)$" $1;

}


location ~* .*\.(jpg|gif|png)$ {

    p_w_picpath_filter crop $width $height;

}


p_w_picpath_filter rotate 90; 图片旋转90°

p_w_picpath_filter_buffer 1M; 图片大小

p_w_picpath_filter_sharpen 0; 图片锐化

crop 根据参数裁剪图片

resize 比例缩放


http://cwtea.blog.51cto.com/4500217/1333142