Can the image cropping function be written into a custom nginx http module?
The demand is like this. Due to business needs, all pictures need to be generated to a new size, but we don’t want to generate them in full, but we want to generate them only when they need to be accessed.
So I want to write it into the nginx module, but I also want to call imagick’s api in a custom module.
I don’t know if this is possible?
这个模块应该可以满足你的需求, 实测可行
本nginx模块主要功能是对请求的图片进行缩略/水印处理,支持文字水印和图片水印。
支持自定义字体,文字大小,水印透明度,水印位置。
判断原图是否是否大于指定尺寸才处理。 ....等等
http://127.0.0.1/test.jpg!c300x200.jpg 将会 生成/输出 test.jpg 300x200 的缩略图
要写C的节奏?直接PHP之类的脚本语言满足不了要求?
nginx httpimagefiltermodule
链接描述