Created
January 25, 2012 11:23
-
-
Save behringer24/1675873 to your computer and use it in GitHub Desktop.
nginx configuration snippet for dynamic image manipulation using HttpImageFilterModule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* nginx configuration snippet for dynamic image manipulation using HttpImageFilterModule | |
* | |
* URL example: http://www.yourserver.com/imgresize/250-100-0/demo.jpg | |
* Parameters are width-height-rotation | |
* You need to compile nginx with --with-http_image_filter_module | |
* More information at http://wiki.nginx.org/HttpImageFilterModule | |
*/ | |
location ~/imgresize/(?P<width>[0-9]+)-(?P<height>[0-9]+)-(?P<rotate>[0-9]+)/(?P<filename>.+)$ { | |
rewrite /imgresize/[0-9]+-[0-9]+-[0-9]+/(.+)$ /images/$1 break; | |
image_filter resize $width $height; | |
image_filter rotate $rotate; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment