AntCMS has built in support for automatically compressing images. It will do this when you have the GD PHP extension installed and asset delivery is running through AntCMS rather than being handled by your webserver.
Images are compressed a single time with the compressed version being retained in AntCMS's cache. The original file remains untouched.
Image compression is automatically enabled for all supported images when using AntCMS. All images will be compressed using the quality level defined in your configuration file (85% by default).
If you want to use a specific quality level on an image rather than using a broad default, you may do so by providing an "imageQuality" GET parameter.
Examples:
/assets/exampleImage.jpg?imageQuality=veryhigh
/assets/exampleImage.jpg?imageQuality=high
/assets/exampleImage.jpg?imageQuality=medium
/assets/exampleImage.jpg?imageQuality=low
/assets/exampleImage.jpg?imageQuality=verylow