Image Compression
AntCMS provides built-in functionality to automatically compress images upon delivery.
How it Works
This feature is automatically enabled when:
- The GD PHP extension is installed on your server.
- Asset delivery is handled directly by AntCMS (rather than exclusively by the web server).
To ensure performance, images are compressed and the result is stored in the AntCMS cache to be re-used upon future requests; your original files remain untouched.
Supported Formats
AntCMS automatically detects and compresses the following formats:
- JPEG / JPG
- PNG
- WEBP
Default Settings
By default, all supported images are processed using a quality level of 85%. This provides an ideal balance between visual fidelity and file size, though this value may be changed via the config file.
Custom Quality Overrides
If you require a specific quality level for a particular image rather than the global default, you can override it by appending an imageQuality GET parameter to your asset URL.
| Level | Value | Example URL |
|---|---|---|
| Very High | 95% | /assets/image.jpg?imageQuality=veryhigh |
| High | 80% | /assets/image.jpg?imageQuality=high |
| Medium | 65% | /assets/image.jpg?imageQuality=medium |
| Low | 25% | /assets/image.jpg?imageQuality=low |
| Very Low | 0% | /assets/image.jpg?imageQuality=verylow |
Visual Comparison
Note: The following images demonstrate the effect of different quality parameters.
Default (85%, configurable)

Very High (95%)

High (80%)

Medium (65%)

Low (25%)

Very Low (0%)
