Description #
Smart Compression, also known as Advanced Custom Compression Level Settings, is CompressX Pro’s intelligent image optimization engine. It gives you full control over how your images are compressed, allowing you to set specific compression levels based on image roles and sizes.
This feature is especially beneficial for WooCommerce sites, as it intelligently understands the image roles, for example, product images, thumbnails, and applies role-specific rules to achieve the best possible optimization result for each image.
In this tutorial, we will see how to get started with Smart Compression.
How to Get Started with Smart Compression #
To access Smart Compression, install CompressX and CompressX Pro Addon on your WordPress site.
Then navigate to CompressX > Compression Level in your WordPress dashboard. You will find four main sections on the page.
1. Global Compression Level #
This is the foundational setting that is available on both the free and pro version of CompressX.
You can set a single, site-wide compression level that will apply to all images by default.
The default value is 80% for WebP and 60% for AVIF, meaning every image will be compressed to approximately this quality, regardless of its type or specific dimensions.
Note:
The ‘Global Compression Level’ settings will be overridden by ‘Compression Levels by Categories’ if enabled. Images assigned to specific categories will use their category’s compression level, while all other images will fall back to the ‘Global Compression Level’ settings.
2. Compression Levels by Category (WordPress Standard Image Types) #
This powerful pro feature allows you to override the Global Compression Level for specific image types or roles within WordPress.
You can define specific compression levels for images based on their types and functions on your WordPress site, including:
• Site logo
• Header background image
• Featured image (Post)
• Featured image (Page)
• Image in sidebar
• Image field used via ACF (Advanced Custom Fields)
3. Compression Levels by Category (WooCommerce Image Type) #
Set specific compression levels for images based on their types and functions on your WooCommerce site, including:
• Product featured image
• Product gallery image
• Variation-specific image
• Category image (taxonomy thumbnail)
4. Compression Level Offsets #
Fine-tune the final compression level by applying compression offsets based on an image’s pixel dimensions (original size of the JPEG/PNG). This ensures that larger images get more aggressive compression, while smaller images retain more detail.
You can define offsets (e.g., -25, -20, +10) for various original image size ranges (e.g., 4MB+, 1-2MB, 0-30KB).
For example: A 4MB+ image might receive an offset of -25, meaning its effective compression quality will be 25 points lower than its category-specific or global setting. Conversely, a 0-30KB image might receive an offset of +15, increasing its quality by 15 points.
This feature automatically balances speed and visual clarity across your entire image library, ensuring that larger files are significantly reduced while crucial details in smaller images are preserved.