Can the image cropping function be written into a custom nginx http module?
巴扎黑
巴扎黑 2017-05-16 17:24:28
0
3
591

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?

巴扎黑
巴扎黑

reply all(3)
阿神

This module should be able to meet your needs, and it is feasible in actual testing

The main function of this nginx module is to perform thumbnail/watermark processing on the requested images, and supports text watermarks and image watermarks.
Supports custom fonts, text size, watermark transparency, and watermark position.
Determine whether the original image is larger than the specified size before processing. ....Wait

http://127.0.0.1/test.jpg!c300x200.jpg will generate/output a thumbnail of test.jpg 300x200

PHPzhong

Want to write the rhythm of C? Direct scripting languages ​​such as PHP cannot meet the requirements?

習慣沉默

nginx httpimagefiltermodule
Link description

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!