Replace image: swap a file and keep its place everywhere
Replace image adds a Replace file control to every image in the media library, in the media dialog and on the Edit Media screen. Use it to fix a picture in place instead of uploading a new one and editing every page.
Replace a file
- Open the image in the media library.
- Click Replace file or drop a new file on it. JPEG, PNG, GIF, WebP, AVIF and SVG are accepted. The file dialog always offers SVG, and the button is called Choose a new image.
- Wait until the preview and the file facts (address, name, type, size and dimensions) update.
You need the permission to edit the image and to upload files.
What stays and what changes
- The ID, title, alt text and caption stay. For the same file type the URL stays too.
- The old file, its original and all its sizes are removed, and the new file is saved with the sizes rebuilt, including the big-image scaling.
- Old WebP and AVIF copies are dropped and new ones are queued when the Images tool is on. The static page cache is cleared.
- If the type or the size shapes changed, the changed file addresses are rewritten in posts, post meta and options, safely for serialized data.
WebP and AVIF for one image
When the Images tool is on, a second row, WebP / AVIF, has Generate for this image (reuses copies that exist) and Regenerate (forces new ones). It converts the full image, its sizes and the original at once and shows how many bytes were saved, for example Already generated: WebP 12 KB (original 40 KB).
Replace with an SVG
An SVG goes through the same strict check as an upload to the media library: scripts and external resources are refused. It needs the tool SVG uploads to be on. If it is off, the message tells you to turn on SVG uploads on the Baza Helper dashboard. The title, alt text and URL stay, the sizes and WebP and AVIF copies are made again, and links that used a changed file name are updated.
