How do I manage the WordPress Media Library safely?

Upload images already resized, with clear file names, and fill in alt text when you place them. WordPress makes several smaller copies of every image and scales anything over 2,560 pixels. Before deleting a file, check no page still uses it, because Delete permanently has no trash and no undo by default.

The short version

  • Resize photos before uploading. Our answer on image sizes gives the numbers.
  • Name files in plain words, like bakery-front-counter.jpg, before you upload.
  • Add alt text where you place the image, describing what it shows.
  • WordPress makes several smaller copies of each upload, so one upload is really several files.
  • Delete permanently means exactly that. Check the image isn’t used anywhere first.

What happens when I upload an image?

WordPress keeps your original and makes extra copies at standard sizes, so it can send phones a smaller file. The defaults, from WordPress’s developer reference, are a 150-pixel square thumbnail, plus versions up to 300, 768, 1,024, 1,536 and 2,048 pixels wide. Themes and plugins often add more.

Since WordPress 5.3, any image wider or taller than 2,560 pixels is scaled down automatically and saved with “-scaled” in its name, per the big images announcement. The original is kept on the server too.

So a 12-megapixel phone photo uploaded as-is fills disk space several times over and may still look soft if your theme picks the wrong copy. Resizing first avoids both. WordPress 7.1 also moved image processing into the browser and added a new crop tool, so the editing screens may look different from older guides.

How do I find and describe an image?

  1. Go to Media, then Library.
  2. Switch between grid and list view with the icons at top left. List view shows file names and which page each file was “uploaded to.”
  3. Search by file name or title.
  4. Select an image to open Attachment details.

WordPress’s Media Library guide lists the fields: Alt Text, Title, Caption, Description and File URL, with a Copy URL to clipboard button. Changes save automatically.

Alt text set here is the default when you next place the image. Alt text already set in a page’s Image block stays as it was. For what to write, see our answer on writing alt text.

Is it safe to delete images?

Only when you’re sure nothing uses them. The Media Library has no trash by default. A site developer can turn one on with a setting called MEDIA_TRASH, which is off unless someone enabled it, per WordPress’s constants reference.

The “Uploaded to” column only shows the page where a file was first uploaded. It doesn’t show every page, post, widget or pattern that uses it later. An image deleted while still in use leaves a broken image on those pages.

Before deleting:

  1. Copy the file name.
  2. Search your pages and posts for it, and check your header, footer and any synced patterns.
  3. If unsure, leave it. Unused images cost disk space, not visitors.

For a big clean-up, ask whoever maintains the site to run a usage check from a backup first. See how often your site should be backed up.

How do I replace a photo with a new version?

WordPress doesn’t have a built-in “replace this file and keep the same address” button. The normal way is to upload the new photo and select Replace on each Image block that showed the old one. Our help on changing a photo or banner has the steps. Some plugins add a replace feature; ask before installing one.

PDFs are the same. See uploading a PDF for updating a document without leaving old copies around.

Which settings affect media?

Under Settings, then Media, the settings guide lists Thumbnail size, Medium size, Large size and Organize my uploads into month- and year-based folders. Leave them alone. Changing sizes doesn’t resize images you’ve already uploaded, and themes are built around the current values.

What are the common mistakes and edge cases?

  • Uploading straight from the phone. Huge files, odd names like IMG_4471, and sometimes the photo’s location in its data.
  • Using screenshots of text. Search engines and screen readers can’t read it. Type the text on the page instead.
  • HEIC photos from iPhones. Support depends on your WordPress version and server. Convert to JPEG or WebP if an upload fails.
  • AVIF images. Supported since WordPress 6.5 if your server can process them, per the AVIF announcement.
  • Attachment pages. WordPress 6.4 turned off the separate page each image used to get, for new sites only, per the change note. Older sites may still have them.
  • Rights. Only upload photos you took, paid for or have a license to use.

What if this didn’t work?

  • If an upload fails, check the file size and type, then try a smaller JPEG.
  • If an image broke after you deleted it, the only way back is a backup restore. Ask whoever maintains the site.
  • If disk space warnings appear, see what Site Health tells you.

How long does it take?

Resizing and renaming a photo takes a minute or two. A careful Media Library clean-up can take an afternoon, which is why most owners just stop the clutter going in.

How does E-3 handle this?

On sites we look after through website care, monitoring tracks disk and database space, and daily backups mean a deleted image can be brought back. Photo swaps are one of the most common edits clients send us; we resize them and prepare a preview for approval.

Rather we handled wordpress for owners for you?

It’s part of what we do every week for small businesses, as part of website care. Start with a free check of your site and profile, or call and ask.

Ask E-3

Suggestions appear as you type. Use the up and down arrows to choose one, or press Enter to ask.

Get support