Skip to main content

Plugin-Based Image Optimization

Image plugins can compress uploads, generate WebP/AVIF, and sometimes rewrite markup to serve next-gen formats. The main risks are double-optimization (multiple tools rewriting images), broken markup, and CLS issues when dimensions are missing.

Pick One Optimizer

Choose one primary image optimization system:

  • An image plugin (ShortPixel/Imagify/WP Compress)
  • Or a CDN optimizer (Cloudflare Polish/Bunny Optimizer)
caution

Avoid running multiple image optimizers that all generate WebP/AVIF and rewrite markup. It can cause duplicate files, broken <picture> output, and hard-to-debug caching.

What to Enable (Baseline)

  • Automatic compression on upload
  • Next-gen format generation (WebP, and AVIF if supported)
  • Keep originals/backups (at least until you trust quality)
  • Lazy-load only below-the-fold images (and exclude the LCP image)

What to Verify

After enabling the plugin:

  1. Inspect the HTML for hero/product images and confirm the output is sane (<img> or <picture>).
  2. Confirm the image file served is WebP/AVIF when supported.
  3. Confirm dimensions are present (CLS safety).
  4. Confirm the LCP image is not lazy-loaded.

Common Problems

ProblemLikely CauseFix
CLS increasesMissing dimensions / markup rewriteEnsure width/height, fix theme/builder templates
WebP/AVIF not servedCache/CDN rewrites or missing rewrite rulesVerify plugin delivery method and purge caches
Quality too lowOver-aggressive compressionIncrease quality level or exclude specific images
Images optimized twiceMultiple optimizers activeDisable one system and re-test

What's Next