Last active
March 31, 2018 16:34
-
-
Save YoshiyukiKato/c9daad402d179fe2d189810370af1e24 to your computer and use it in GitHub Desktop.
nginxで画像をリサイズする
This file contains hidden or 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
# /img/w/10/h/10/img.png >> 10 x 10 にリサイズされた /path/to/image/dir/img.png が帰ってくる | |
location ~ /img/w/([0-9]+)/h/([0-9]+)/(.+) { | |
alias /path/to/image/dir/$3; | |
image_filter resize $1 $2; | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment