Back to Community

Understanding and Managing Duplicate and Original Images with Smush

Content

Many WordPress users encounter confusion and frustration when managing their media libraries, especially concerning duplicate images and large original files. This guide explains why these issues occur and offers practical solutions to manage your disk space effectively while using the Smush plugin.

Why Do I See Duplicate or "Fake" Images?

A common issue, as seen in Thread 1, is the appearance of "fake duplicates" in the media library. This often happens when an external script or process overwrites an image file in the server's uploads directory without properly updating the WordPress database. The database record for the old image remains, pointing to a file that has been replaced. This creates a disconnect where the media library shows an image that doesn't truly exist as a separate file. This is not a caching issue but a problem with how the media import process interacts with the WordPress database.

Does Smush Create Duplicate Images?

No. According to multiple support threads (like Thread 3), the free version of Smush does not create backup copies of your images. When you run the optimization process, Smush replaces the generated attachment sizes (e.g., thumbnail, medium, large) with new optimized versions. Your original, full-size upload always remains untouched by the Smush process itself.

The Challenge of Large Original Images

The core of the storage issue often lies with the original images themselves. Users in Threads 2, 10, 11, 12, and 14 all highlight the problem of large original files consuming significant disk space. This is compounded by WordPress core functionality introduced in version 5.3, which creates a "-scaled" version of any image larger than 2560px in width or height, but still keeps the original massive file on the server.

Common Solutions and Workarounds

1. Compress Your Original Images

You can reduce the size of the original images without deleting them. Navigate to Smush > Bulk Smush and ensure the "Compress original images" setting is enabled. This will apply lossless compression to your original uploads, saving space while retaining the file.

2. Control Image Sizes

Prevent unnecessarily large images from being created in the first place. Within Smush's Bulk Smush settings, you can enable "Resize original images" to set a maximum width and height for all uploads. You can also choose which registered WordPress image sizes (thumbnail, medium, large) are optimized by Smush, excluding any you don't need.

3. Manual Cleanup (Advanced)

If you are certain that you will never need the original, full-resolution images and understand the risks, you can manually delete them via your hosting file manager or FTP. Warning: This is not recommended, as original images are needed to regenerate thumbnails if you change your theme or if a plugin requires a new image size. Always have a complete site backup before attempting this.

4. Exclude Images from Optimization

If you have specific images you do not want Smush to optimize (Threads 5, 7, 13), you can use a must-use (mu-)plugin to exclude them by their attachment ID. You can also ignore images directly from the Media Library list view before smushing.

Important Note on Backups

Smush has a setting to "Disable backup of original images". It is important to understand that this setting only applies to backups Smush might create during its own processes. It does not delete the original image uploaded to WordPress. The original file is always preserved by WordPress core.

In summary, while Smush itself does not create problematic duplicates, managing your media library requires an understanding of how WordPress handles images. The most effective strategies involve compressing originals, resizing on upload, and carefully curating which image sizes are generated and optimized.