Repository navigation
Measured image priority
If a public page loads its main image late, a theme developer can measure which image determines Largest Contentful Paint (LCP) on both mobile and desktop. ARC 0.14.0 can then give that image high fetch priority when filling its guest page cache. WordPress, Lens and the browser keep choosing the responsive file.
Use the ARC source checkout on a build machine with Node.js, Playwright and Chromium. Point the tool at a public HTTPS URL on staging. Use the final URL after any redirects, with no query string.
node bin/measure-lcp-image.cjs https://staging.example.org/events/ ./candidate-profiles > before.jsonThe tool opens six fresh Chromium contexts, three at each width. The report contains the LCP element, elapsed milliseconds, image URL and request count for each visit. A non-null profile means the same image element qualified in all six visits. One responsive element can use different source files on mobile and desktop.

The animation uses the six recorded visits to William Unicycle. The existing hero had high priority, was preloaded and downloaded once per visit. The report returned profile: null. A text LCP, different winning elements or competing image priorities can also leave the profile empty.
-
Copy the generated JSON file, with its generated filename, into the active staging theme’s
arc-lcp-images/directory. The profile is specific to the measured HTTPS host and path. -
Register theme support during
after_setup_theme.add_action( 'after_setup_theme', static function () { add_theme_support( 'aceredis-measured-lcp' ); } );
-
Purge that page and request it as a guest. Inspect the served HTML for
fetchpriority="high"on the measured image. ARC changes native lazy loading to eager when appropriate and preserves the responsive sources. -
Run the command again without the output directory, redirecting the report to
after.json. Compare median LCP at each width and check the intended image downloaded once in every sample. Repeat the comparison before adopting the profile.
ARC accepts profiles up to seven days old. Rebuild after a theme, image or layout change. To withdraw a trial, remove its profile and purge that page’s cached HTML.
A synthetic responsive hero improved in the browser fixture. The three public homepages we measured showed why each theme needs its own evidence. William Unicycle already prioritised the right hero. Sheffield Events had a heading as its mobile LCP and a map tile on desktop. On Uni-Carts we compared the existing priorities with a browser-only change to the cover and seven gallery images. In 20 cold visits the cover downloaded once each time. Median mobile LCP went from 440 to 460 ms and desktop from 496 to 528 ms. The site kept its existing priorities. Measurements and trial results
Ace Redis Cache: a page cache and object cache for WordPress, backed by Redis or Valkey. Written and maintained by Shane Rounce at AceMedia. Website · Repository · Issues · GPLv2 or later
Setting up
The caches
- Page cache
- Measured image priority
- Object cache
- Logged-in page cache
- Block cache
- Purging and refresh
Your stack
Reference
Help
