Your prompt
Optimize my whole media library: compress every image, convert to WebP, resize anything wider than 2000px, and add width and height where they are missing.
What this prompt does
This prompt asks your AI assistant to go through the whole media library and make every image lighter. It compresses each file, converts it to WebP, shrinks anything wider than 2000 pixels, and adds missing width and height attributes. Smaller images make pages load faster, and the attributes help the browser reserve space so the page does not jump while loading.
It is a bulk job, so it can take a while on a large library. It usually relies on an image optimization plugin or a command-line tool.
WebP is widely supported in modern browsers and WordPress can handle the format, but check any special cases such as downloads.
Run it once for the existing library. After that, ask your assistant to set up optimization on upload, so new images do not need another bulk job.
Before you run it
Bulk image changes alter files and are hard to undo without a copy.
- Take a full backup including the uploads folder, and keep the originals until you are satisfied.
- Check you have free disk space for the new versions.
- Run it on a staging copy first if you can.
- Decide whether any images must stay at full size, such as print downloads or photography portfolios.
Also ask what happens to existing links. Replacing a JPEG with a WebP can break hard-coded references, unless the plugin serves the new format in a way that keeps them working.
What to check afterwards
- Your largest pages load noticeably faster, measured with the same tool as before.
- Pictures are sharp at their displayed size.
- No images are missing or showing broken icons.
- Image elements carry width and height, and the layout no longer shifts.
- Logos and transparent graphics still look correct.
Ways to adapt it
- Test a few: Only process the 50 largest images and show me the savings first.
- Keep originals: Store the originals in a separate folder before compressing.
- Change the size cap: Resize anything over 1600px wide instead.
If it goes wrong
- Images look blurry or banded. Restore from backup and ask for a higher quality setting.
- The job times out. Process in batches or ask your host about time limits.
- Some images did not convert. Check for unusual formats such as animated GIFs, and handle those separately.
Background reading is in optimizing images with WebP and AVIF and image SEO, and the task also feeds Core Web Vitals.