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?
阿神2017-05-16 17:26:28
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
PHPz2017-05-16 17:26:28
Want to write the rhythm of C? Direct scripting languages such as PHP cannot meet the requirements?