Disable Image Compression
Overview
Force WordPress image quality to 100 for generated image derivatives.
The snippet hooks into the editor quality and format-specific quality filters for JPEG, WebP, and AVIF. Use it when image optimization is handled elsewhere and WordPress should not apply its default compression during upload processing.
Variants
- Procedural
- OOP