Back to Guides

Vyso Guides

WordPress image performance: fix loading and SEO

Updated October 14, 2026
WordPressPerformanceImage SEO

For WordPress performance optimization, start with the images the browser actually downloads and when it requests them. Correct dimensions and compression reduce transfer work. Early discovery of the main image helps Largest Contentful Paint, while reserved image space helps prevent layout shifts.

Measure one representative page before changing settings. A large image file, a late image request, and a slow HTML response can produce similar symptoms but need different fixes. Keep the page, viewport, and test conditions consistent when comparing changes.

Identify the image affecting the visible page

Largest Contentful Paint, or LCP, measures when the largest eligible visible content element renders. That element may be an image or text. The LCP guidance uses 2.5 seconds or less as the good threshold, assessed at the 75th percentile of page loads.

Use PageSpeed Insights or a browser performance recording to identify the LCP element. Then inspect the matching request in the Network panel. Do not assume the first image in the Media Library, or even the featured image, is the element that determines LCP.

The LCP optimization guidance separates four parts: the time before the first HTML byte, delay before the LCP resource starts loading, resource download duration, and delay before the element renders. Compare those parts before deciding that more image compression is the next fix.

If most time passes before HTML arrives, investigate server response and page caching. If the image begins late, investigate markup, lazy loading, or script-based insertion. If its transfer occupies the delay, inspect dimensions, compression, and delivery. An image that finishes downloading but remains hidden needs a rendering investigation.

Check dimensions and responsive image selection

An image should offer a resolution suitable for its displayed width and the screen's density. For example, a 700 CSS-pixel placement may use a 1400-pixel candidate on a 2× screen. Choose candidates from your own layout and device requirements. It should not automatically receive a camera-sized original when smaller suitable variants exist.

WordPress can generate responsive image markup from attachment metadata. The WordPress resizing guide explains registered variants and rebuilding them. The page's sizes should describe the layout, while srcset offers actual files. Page builders, custom templates, and CSS background images can use other output paths, so inspect each important placement.

In Chrome's Elements panel, select the img element. The Console Utilities documentation describes $0 as the selected element. Run this read-only expression after the image has loaded. It reports the selected URL, displayed width, and screen density:

(() => {
  const image = $0;
  if (!(image instanceof HTMLImageElement)) {
    throw new Error("Select the img element in the Elements panel first.");
  }

  return {
    url: image.currentSrc,
    displayedWidth: Math.round(image.getBoundingClientRect().width),
    pixelRatio: window.devicePixelRatio
  };
})()

Open the returned URL in the Network panel and check its dimensions. Account for device density before deciding that a larger candidate is wasteful. If the selected resource is far wider than needed, check whether the relevant smaller size exists and whether the template requests Full Size.

Compress for acceptable output quality

Remove unnecessary resolution, then compare encoding settings at the intended display size. A file-size target without an image type or layout does not establish a useful quality setting.

Use the original master for each export. Compare JPEG, WebP, or AVIF for photographs, and preserve transparency or sharp text where the graphic needs it. Review detail that would reveal damage: lettering, thin lines, hair, fabric, or smooth color gradients.

"Without losing quality" can mean two things. Lossless compression preserves decoded pixels. Lossy output can look unchanged to a viewer while discarding information. Choose the promise you need before changing settings, especially for product detail or photography.

The WordPress image compression guide covers compression settings and existing uploads. Measure the public response after processing. A plugin's saved-file total does not tell you whether the page uses those files.

Let the main image load early

A visible hero image should be discoverable in the initial HTML when practical. An image inserted only after JavaScript runs can start later. A CSS background can also require the stylesheet to be fetched and parsed before its URL is discovered.

The Fetch Priority guidance explains how to indicate relative resource priority. A targeted fetchpriority="high" hints that an important image should receive higher fetch priority. It does not make a script-inserted URL discoverable earlier. Assigning high priority to every image removes the usefulness of prioritizing the main one.

WordPress adds loading-related attributes through wp_get_loading_optimization_attributes(). Theme markup or a plugin can affect the final result. Inspect the rendered element before adding another filter or preload.

A preload can help a genuinely late-discovered critical image, but it must match the resource the page uses. For responsive images, follow responsive preload guidance so the preload participates in candidate selection. A mismatched URL can fetch an additional image.

Lazy-load lower images and reserve their space

Use lazy loading for images outside the initial viewport. Avoid applying it to the likely LCP image. Browser-level lazy loading supports this through loading="lazy", and the browser can fetch images before they become visible.

Review the final output if a plugin also performs lazy loading. A normal src replaced with data-src may introduce a script dependency. Test a fast scroll through galleries and articles so readers do not encounter blank placeholders.

Keep image width and height attributes or another reliable aspect-ratio reservation. The layout shift guidance explains how dimensions let the browser reserve space. CSS can still make the image fluid while preserving its ratio.

A fixed-height hero that crops the image needs a stable container size too. Compression does not resolve a container that changes height after an image or page-builder script loads.

Use a CDN when delivery is the bottleneck

Inspect response timing for visitors far from the origin before selecting an image CDN. The WordPress image CDN guide compares delivery models and cache behavior. Cached edge delivery can reduce repeated origin work, while a transformation service can also change dimensions or format. Confirm which operation your integration performs.

Compare an initial request and repeated requests. Disable browser caching for a repeatable network comparison, then inspect the delivery response headers. This leaves the CDN cache intact, so its hits and misses can be evaluated separately. The Chrome Network reference covers cache controls, transferred size, headers, and timing details useful for that check.

When replacing an image, invalidate the relevant cached files or use a new URL according to the provider's documented workflow. Verify the response from a public page after the change. A correctly optimized origin copy can remain hidden behind an older cached response.

Improve image SEO without confusing it with compression

Google's image search guidance recommends useful surrounding content, descriptive filenames, and relevant alt text. Google discovers images from image elements' src attributes and does not index CSS images.

Use an image element for content that readers and search engines should understand as part of the article. Keep a working src fallback when using picture. Check that the image URL is publicly accessible and that the site does not unintentionally block crawling.

Write alt text for the image's purpose in its page context. Describe meaningful information; do not insert a string of optimization keywords. Purely decorative images generally need empty alt text. A caption can explain context that belongs in the visible article rather than repeating the alt attribute.

Compression changes file delivery. It does not write an accurate description or repair unrelated page metadata. Google's page experience documentation also makes clear that good Core Web Vitals do not guarantee top rankings.

Compare the change in lab and field data

Retest the same page while logged out, with the same device and throttling conditions. Record the selected image URL, dimensions, transferred bytes, request start, and LCP. Run enough comparable checks to notice a pattern instead of treating one unusually fast run as the result.

PageSpeed Insights separates lab testing from real-user field data. Its documentation describes a trailing 28-day collection period for field metrics. Check whether the displayed field result is for the individual URL or the whole origin; an origin result can appear when page-level data is insufficient. A deployment can change the current lab result immediately while the historical field result changes gradually.

If the file is smaller but LCP remains high, return to the timing breakdown. Check the initial HTML response and the gap between download completion and rendering. When the LCP element is text, investigate its font and rendering dependencies. Keep the image improvements that are verified, then work on the remaining measured delay.

Reduce delivery work for images managed in Vyso

Vyso's CDN delivery can serve resized images with chosen quality settings and WebP or AVIF output while keeping the original asset. If your WordPress template uses those delivery URLs, measure the selected file and download duration before and after the change. The template's markup still determines resource discovery, loading priority, and reserved layout space. Vyso is also developing a WordPress image plugin to connect WordPress publishing workflows with its media library; it is not available to install yet.

Keep going

Make the media library less work.

See how Vyso brings search, enrichment, cleanup, and delivery into one product.

Start free