30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Update Media Exclusions

litespeed/update-media-exclusions changes one lazy-load exclusion list: add to it, remove from it, or replace it.

Excluding the images at the top of a page is the standard fix for a page that renders blank for a moment.

At a glance

Abilitylitespeed/update-media-exclusions
ToolsetLiteSpeed Cache — toolset/litespeed
GroupLiteSpeed Cache › Images & Lazy Load
RequiresLiteSpeed Cache, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

The lists cover the ways an image can be identified: by its source, by its own class, by its parent’s class, by the URI of the page it is on, and the same two class options for iframes.

Parent class is the one people forget and the one that usually works. A hero image rarely has a distinctive class of its own, but it is reliably inside a container that does — site-header, hero, the slider’s wrapper. Excluding by parent class catches every image in that block without naming any of them.

Excluding by URI is the whole-page version: no lazy loading anywhere on that path. Right for a landing page that is mostly images above the fold, too broad for most things.

Matching on source works for a specific file and stops working when the file is renamed or a responsive size is served instead. Prefer a class where one exists.

The mode means a single exclusion can be added without reading and rewriting the list.

Input

NameTypeRequiredWhat it is
typestringYesimage (by src), image-class, image-parent-class, uri, iframe-class or iframe-parent-class.
valuesarrayYesThe entries to add, remove or set.
modestringNo — defaults to addadd, remove or replace.

What comes back

NameTypeWhat it is
updatedarrayThe keys that actually changed. An empty array means every value you sent was already set.
settingsarrayEvery setting in the area after the write, in the read shape.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Stop lazy loading the hero image in the header.

It resolves to one call:

{
  "ability": "litespeed/update-media-exclusions",
  "parameters": {
    "type": "image-parent-class",
    "values": ["site-hero"],
    "mode": "add"
  }
}

Worth knowing

  • Parent class is usually the most reliable match for a hero image.
  • Matching by source breaks when responsive sizes are served.
  • URI exclusion disables lazy loading for the whole page.
  • Purge afterwards.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading