New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Images

How to optimize WordPress images

Oversized uploads are the most common WordPress performance mistake. A 4000px hero uploaded from a phone becomes multiple thumbnails and slows every page. This guide covers compression, sizing, and delivery without ruining WooCommerce product detail.

Time: 30-60 minutes Level: Beginner

What this problem looks like

WordPress generates several sizes per upload. One careless 5 MB PNG can produce a megabyte of thumbnails across sizes. Optimisation starts at upload discipline, then automation.

WooCommerce product galleries need enough resolution for zoom. Compress aggressively on blog images, more carefully on primary product photos.

Set maximum upload dimensions

WordPress 5.3+ scales down huge uploads, but themes may still request full size. Add limits in functions or use a plugin to cap upload width at 2000px for heroes and 1500px for inline content unless you sell art prints.

php
add_filter( 'big_image_size_threshold', function() {
	return 2048;
} );

Choose a compression plugin

  • ShortPixel: strong WebP and AVIF, good WooCommerce support.
  • Imagify: integrates with WP Rocket.
  • EWWW: local compression option for privacy-sensitive shops.
  • Smush: easy bulk smush for blogs and brochure sites.

Use modern formats with fallbacks

WebP and AVIF cut bytes dramatically. Enable picture tag delivery or server content negotiation. Keep JPEG originals until you verify Safari and older browsers in your analytics.

Regenerate thumbnails after theme change

New themes register new image sizes. Old thumbnails stay at wrong dimensions until regeneration. Use Regenerate Thumbnails or WP-CLI after switching themes.

bash
wp media regenerate --yes

Lazy load and priority hints

WordPress lazy loads images by default. Do not lazy load the LCP hero. Use fetchpriority high on the main above-fold image in block themes or your template.

Bulk optimise on staging first for shops with tens of thousands of product images. Run heavy jobs off-peak.

When to stop DIY and hire help

Large catalogs, custom image pipelines, or print-on-demand shops need tuned rules per category. BugShield optimises WooCommerce media without breaking zoom or colour accuracy.

FAQs

What image size should I upload to WordPress?

Upload close to display size. Heroes rarely need more than 1920px wide. Product images depend on zoom level, often 1200 to 2000px.

Does WebP work with WooCommerce?

Yes with modern optimisation plugins. Test checkout and product gallery on iOS Safari before bulk conversion.

Will optimising images hurt SEO?

No. Faster pages help SEO. Keep descriptive alt text and filenames.

Should I use a CDN for images?

Yes on traffic-heavy sites. Cloudflare, Bunny CDN, or plugin CDNs reduce origin load and improve global TTFB for media.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix