Every image, PDF and video you upload to WordPress ends up in the Media Library. Over time, it can grow into thousands of files: duplicate images, oversized photos, unused uploads and files with meaningless names. A messy media library makes it harder to find files, increases backup sizes and can slow your website.
This guide explains how to upload, organise, optimise and clean up your WordPress media library effectively.
What the Media Library Stores
| — | — |
|---|---|
| Images | JPG, PNG, WebP, GIF, SVG (with care) |
| Documents | PDF, DOCX, presentations |
| Audio | MP3, WAV |
| Video | MP4 (often better hosted on video platforms) |
WordPress stores uploads in wp-content/uploads, usually organised by year and month.
Step 1: Prepare Images Before Uploading
- Resize to the largest size needed on your site
- Compress to reduce file size
- Use modern formats such as WebP where supported
- Rename files descriptively, for example “balcony-tomato-plants.jpg”
Step 2: Add Image Details
After uploading, add:
- Alt text: describes the image for accessibility and search engines
- Title: for internal organisation
- Caption: optional visible text under the image
- Description: optional details for attachment pages
Step 3: Configure Image Sizes
WordPress automatically creates multiple sizes for each uploaded image (thumbnail, medium, large and others defined by themes and plugins). Review Settings → Media and theme settings. Excessive sizes increase storage use. Some optimisation plugins allow you to disable unnecessary sizes.
Step 4: Organise Your Library
WordPress does not include folders by default. Options include:
- Consistent file naming conventions
- Using the search box to find files quickly
- Media folder plugins for large libraries
- Uploading files in context so they are attached to posts
Step 5: Optimise Existing Images
Image optimisation plugins can bulk compress existing images and generate WebP versions. Back up before running bulk optimisation on large libraries.
Step 6: Host Videos Externally
Uploading large videos directly can strain hosting and slow your site. Hosting videos on platforms like YouTube or a dedicated video service and embedding them is usually more efficient.
Step 7: Clean Up Unused Media
Unused files waste storage. Cleanup tools can identify images not used in content, but they are not always accurate because images may be used in widgets, themes or page builders. Review results carefully and back up before deleting.
Step 8: Disable Attachment Pages
WordPress can create separate attachment pages for each media file. These thin pages offer little value. Many SEO plugins redirect attachment URLs to the file or parent post.
Media Library Best Practices
| — | — |
|---|---|
| Regular cleanup | Easier management, smaller backups |
Security Considerations
Only allow trusted users to upload files. Be cautious with SVG files, which can contain scripts; use a plugin that sanitises SVGs if you need them. Keep upload folders protected with correct permissions.
Common Mistakes
- Uploading huge photos straight from a camera
- Using names like “IMG_0001.jpg”
- Skipping alt text
- Deleting media without checking where it is used
- Uploading many large videos to WordPress hosting
Real-World Example
A photography blog’s backups took hours and pages loaded slowly. The media library contained thousands of full-resolution images over 5 MB each. The owner resized and compressed images with a bulk optimisation plugin, converted them to WebP, removed confirmed unused duplicates and set a workflow to resize future uploads. Storage use dropped significantly and page speed improved.
Frequently Asked Questions
Can I create folders in the WordPress media library?
Not by default, but media folder plugins add this feature.
Why does WordPress create multiple copies of images?
It generates different sizes for responsive layouts and theme needs.
Should I delete unused images?
Yes, carefully, after confirming they are truly unused and backing up.
What is the best image format for WordPress?
WebP is often a good choice for photos and graphics because of its efficient compression.
Can I replace an image without changing its URL?
Some plugins allow replacing media files while keeping the same URL.
Is it safe to upload SVG files?
Only with sanitisation, because SVGs can contain code.
Conclusion
A well-managed media library keeps your WordPress site fast, organised and easy to maintain. Prepare images before uploading, add descriptive details, limit unnecessary sizes, host videos externally and clean up carefully with backups. Good media habits save time and improve user experience.