ngx_http_image_filter_module
NGINX Image Filter Module
Modifications
Original source is from NGINX 1.11.13
Always process the source JPEG or PNG image
Original NGINX code would only resize the image if:
- The source image exceeded the maximum width or height settings
- OR
- The JPEG meta-data exceeded 5% of the file size
Set ctx->force
to ensure the image is always processed. This allows setting the output JPEG quality without changing the image dimensions
Output JPEG irrespective of whether the source image was PNG or JPEG
PNG was designed to be lossless and usually has larger file size. In my use case JPEG output is more appropriate.
To-Do
- Currently changes above are hard coded. These should be changed to configuration settings.
- Submit changes back to NGINX!
See also:
License
- Same terms as NGINX. See LICENSE