Exclude Specific WordPress Image Sizes from Optimization
WordPress automatically creates multiple image sizes whenever you upload an image to the Media Library. Depending on your theme, plugins, and media settings, a single upload can generate several additional versions of the same image.
LessFlux allows you to exclude specific WordPress image sizes from optimization. This gives you greater control over how optimization tokens are used and can help avoid processing image sizes that are never displayed on your website.
Why WordPress Creates Multiple Image Sizes
When an image is uploaded, WordPress generates additional versions for different use cases throughout your website. Common examples include:
- Thumbnail
- Medium
- Medium Large
- Large
- Custom sizes created by themes
- Custom sizes created by page builders or plugins
- WooCommerce product image sizes
As a result, uploading a single image may create multiple files stored inside the uploads directory.
Why Exclude Certain Image Sizes?
Not every generated image size is actually used on the front end of your website. Some themes and plugins create image sizes that are never displayed, while others may only be used in specific areas of the WordPress admin interface.
By excluding unnecessary image sizes from optimization, you can:
- Reduce optimization workload.
- Focus optimization on the image sizes that matter most.
- Avoid spending tokens on unused image variants.
- Speed up bulk optimization tasks.
- Simplify media processing on large websites.
How to Exclude Image Sizes from Optimization
- Open your WordPress admin dashboard.
- Navigate to LessFlux → Image Settings.
- Locate the Ignore Image Sizes setting.
- Select the image sizes you want LessFlux to skip.
- Save your changes.
Once configured, LessFlux will ignore the selected image sizes during future optimization operations.
What Happens When a Size Is Excluded?
When an image size is excluded, WordPress still generates that image size normally. The file remains available and continues to function exactly as expected.
The only difference is that LessFlux will not process or optimize that specific version of the image.
All other image sizes that are not excluded will continue to be optimized according to your current settings.
Should You Exclude Any Sizes?
For most websites, it is recommended to optimize all image sizes. This ensures that every image served to visitors benefits from compression and format conversion where applicable.
Excluding image sizes is generally recommended only when:
- You know certain image sizes are never used.
- A theme or plugin generates unnecessary image variants.
- You want to reduce processing during large bulk optimization tasks.
- You are troubleshooting a specific media workflow.
How Exclusions Affect Existing Images
Changing image size exclusions only affects future optimization operations.
Image sizes that were previously optimized will remain optimized unless they are regenerated or reprocessed. Likewise, image sizes that were previously skipped will not be automatically revisited unless a new optimization task is started.
Important Notes
- Excluded image sizes are still generated by WordPress.
- Excluded image sizes remain available to themes and plugins.
- Only optimization is skipped.
- Other image sizes continue to be processed normally.
- The original uploaded image is not affected by image size exclusions.
- Custom image sizes created by themes and plugins may also appear in the exclusion list.
Recommended Configuration
If you are unsure which image sizes your website uses, leave image size exclusions disabled and allow LessFlux to optimize all generated image sizes.
Only exclude image sizes when you have confirmed they are unnecessary or when you want more precise control over optimization behavior on large or complex WordPress installations.