Your prompt

Compress and convert all images to WebP, add lazy loading below the fold, and preload the main hero image.

What this prompt does

This prompt covers three image tasks in one: compress and convert images to WebP, lazy load images below the fold, and preload the main hero image.

Each does something different. Compression shrinks files. Lazy loading delays images that are not visible yet. Preloading tells the browser to fetch the most important image early. WordPress already adds lazy loading to many images by default, so part of the job may be checking what is already in place.

The order matters. Compressing first means every later step works with smaller files, and preloading only the hero image keeps the browser from fetching everything at once.

Before you run it

  • Back up your uploads folder and database. Conversion can replace files.
  • Ask whether original files will be kept. Keeping them lets you roll back.
  • Check that your host supports WebP, and that your visitors’ browsers are modern enough. Most current browsers are.
  • Tell the assistant which image is the hero, or let it name its choice for you to confirm.
  • Do not lazy load the hero image itself, since it appears at the top of the page.
  • If your theme or a caching plugin already converts images or sets lazy loading, tell the assistant so it does not do the same job twice.

What to check afterwards

  • Open key pages and look for broken or blurry images.
  • Check the hero image appears quickly and is not lazy loaded.
  • View the Network tab or the page source to confirm WebP files are served.
  • Scroll down a long page to see that images load as you reach them.
  • Re-run a speed test and compare.

Ways to adapt it

  • Set a quality level: “Compress at a quality that is visually the same and show me the size saved on five examples.”
  • Keep originals: “Convert only copies and leave the original files in place.”
  • Limit scope: “Start with the blog’s featured images.”

If it goes wrong

  • Some images are missing. Restore from the backup and ask the assistant to check the file paths.
  • The hero image flashes in late. Make sure it is not lazy loaded and is preloaded once only.
  • Images look soft. Re-run compression at a higher quality.
  • Lazy loading and a cache plugin overlap, and images load twice or not at all. Turn off the duplicate setting in one of them.

Our guide to optimising images with WebP and AVIF and the image SEO guide explain the choices behind this.

← Every prompt on WPMusk

SponsoredNibWP

Stop clicking. Start telling.

Ask your AI to build pages, fix speed and nail SEO, and NibWP does it on your WordPress site in minutes.

Try NibWP.com

Get the WPMusk Sunday brief

One email a week with our newest tutorials, honest tool reviews and resources you won’t find on the blog. No spam, unsubscribe in one click.

Newsletter (Sunday brief)