Better Media Management in WordPress

JunkClosetWordPress makes it very easy to add media (photos, PDFs, Word docs, etc.) to your site with the Add Media button.

Like many cloud storage programs, WordPress stores the media files in a separate area from the content.  This can create an “out of site, out of mind” pile of files in the Media Library.

The older your site grows, the bigger the Media Library. If you keep adding media, eventually it will grow into a junk closet situation where you dread the cleanup process, and may even upload additional copies of files to avoid digging through the big pile of existing files.

The following tips will help prevent the problem and to make the cleanup less painful.

  • Upload a media file once and reuse it in multiple pages and posts.  This saves  a ton of space and clutter in the Media Library.
  • When you need to delete a media file, start in the Media Library and look at the places the file has been inserted (see instructions below on Cleaning Up the Junk Closet).  Once you know the location of the inserted files, then delete the original from the Media Library, and edit each page and post to remove the inserted files.
  • If you need to update a media file, use the instructions above re deleting files.
  • Give meaningful names to media files before you upload them to WordPress.  Consider what would be a meaningful name when you review the Media Library six months or a year from now.  Do not include spaces or punctuation (except underscores or dashes) in the filename.  Once you’ve uploaded the file to the Media Library, you can add a description that visitors won’t see.
  • Downsize the file BEFORE you upload it to WordPress.  The file resolution should not be greater than 72ppi, and the width should be about 300px maximum.  Banner images are the exception.  The site lets you downsize the files without additional software like Adobe Photoshop.
  • Don’t upload photos straight from a camera.  The filenames will not be meaningful and the file sizes may be needlessly huge.

Cleaning Up the Junk Closet

The good news is that the Media Library has tools to help you brave and survive a trip to the junk closet, no matter how packed it may be.

Before you attempt a cleanup, I recommend getting a backup copy of the files in your Media Library ,* just in case you get a little too zealous in cleanup and discover you need to resurrect a file.

* If you’re an existing Shelldrake customer, email me and I’ll explain how to do this.

The Media Library screen contains two views:

  • the grid view (the default view with all the photos)
  • the list view, which is very useful for cleanup

Click the List View icon to switch to list view:


The screen changes to show column headers – File, Author, Uploaded to, and Date.  To sort the list in ascending order, click the column header. Click the column header again to sort the list in descending order.

Try sorting by File to find duplicate files; Date to find outdated files.

Use the Uploaded to column to find pages and posts where a media file was inserted.  Be aware that the information in this column is not 100% accurate – for example it will not tell you if an image file was used in a banner on some of the older sites at Russell, or if an image was used in a RoyalSlider.  This is why I recommend getting a backup before you begin cleaning the Media Library.

If your WordPress site is hosted at Russell Labs or at UW-Extension, you may be able to get more columns, including file sizes.  If you’re an existing Shelldrake customer, email me and I’ll explain more.