Plugins: Essential Media Management Operations

Plugins: Essential Media Management Operations

Essential Maintenance Tasks for Media

Enable Trash in Media Library

It is important to enable the Recycle Bin (Trash) option in the Media Library to save yourself from future headaches. Manually enabling the trash feature in WordPress media library is as simple as adding define('MEDIA_TRASH', true);

Alternatively, there is a plugin called Media Trash Button which will do that for us and enable a trash button below each media item in the media library.

Rename Image Files

The most common reason for wanting to change the name of an image is for SEO purposes or if the current name is particularly unattractive. However, it’s important to note that the plugin must go through all the content and change the image name in every instance, which can be a challenging task. Additionally, the cache must also be cleared.

In my experience, it’s usually faster and more accurate to manually change the image in the content rather than relying on a plugin to do it.

Phoenix Media Rename

Phoenix Media Rename mi se čini da je baš ono što treba - najjednostavnije.

File Media Renamer

File Media Renamer

Media File Renamer by Meow

Media File Renamer by Meow

This is very important for SEO. Auto-renames your media filenames depending on their titles. When files are renamed, the references to it are also updated (posts, pages, custom types and their metadata). Free version does not allow you to change the filename directly but as you change the title of the media the plugin will then change the filename. Works perfect. My suggestion is to disable auto-rename in this plugin and just enable manual rename. Probably deserves reading Tutorial

Replace Image with New One

When I want to change an image content and not its name or location, I use a plugin to replace the old image with the new one, keeping the same ID. WordPress stores images based on their ID, and just adding a new image with the same name and deleting the old one will not work as the new image will have a different ID and then lot of things will not work, such as galleries that often store images as a list of image IDs.

A plugin is needed to save the new image in the same place, with the same ID, even if the new image has a different size. I recommend keeping the name of the photo the same, and if you really want to change the name, best is to create a redirection or replace every image occurrence - a separate process explained under “Rename Image” section.

Easy Media Replace

Easy Media Replace will replace a media file while retaining the attachment URL and ID. This plugin is simple to useand thumbnails are automatically regenerated without the need for a separate plugin.

Enable Media Replace

Enable Media Replace by ShortPixel is another must-have plugin. It allows you to replace a file in your media library by uploading a new file in its place, eliminating the need for deleting, renaming, and re-uploading files. However, I don’t like the fact that they started adding features that have nothing to do with the original purpose of the plugin, all in an effort to boost sales for the company ShortPixel, which bought the plugin for that purpose.

This plugin has an advanced feature that allows you to change the file name and then automatically change all links in the content, but such processes are always risky and may cause errors.

WXY Tools Media Replace

WXY Tools Media Replace plugin is considered by myself to be the most advanced media-replace plugin. It works automatically during upload by comparing the name of the new file with the existing files. If the file name is identical, the file is replaced while preserving the original ID. It works great with both single or multiple file uploads. It is actually much better than manual replacement, as you don’t have to go to the Media Library to do that.

Other less maintained plugins with similar functionality are: Easy Replace Image, WP Media Replace


Sync Media Library to Physical Content

import local images, create attachments from local files, Sync Media Library to Mirror Uploads Folder Content

The goal of those plugins is to make the media library consistent with the files in the uploads folder. Here are a ways to register any new images from local folders and put them into Media Library.

Bulk Media Register

Bulk Media Register je savršen plugin koju u Media Library ubaci sve što ponađe u Uploads folderu a može i da se bira uvoz iz samo nekih podfoldera. Autor je moj omiljeni Japanac koji voli efikasnost. Od istog autora je i plugin Media from FTP koji se meni čini da radi skoro identičnu stvar, možda na malo drugačiji način.

Media Sync

Media Sync is great to retrieve Media Library from uploads folder aka FTP. And as an bonus has filters to check for attachments without files.

WP-CLI Media Import Commend

We can use WP-CLI command wp media import info; can import local but also from any URL remotely; should be the fastest

Add From Server

Add From Server allows you to upload files via FTP and than import them into Media Library

Media Library Recovery

Media Library Recovery will restore media deleted from the database but still available on the server, a to je ustvari isto ovo što i drugi pluginovi rade


Bulk Media Import

Ova grupa dodataka je ustvari vrlo slična prethodnoj, ali ipak na neki način različita.

Media from ZIP

Ako želiš da lako ubaciš datoteke iz ZIP arhive, upotrebi dodatak Media from ZIP koji će zadržati željenu strukturu foldera iz same arhive.


Cleanup Unattached Images

In fact, I think there is no way to connect aka reattach an image to an article, other than re-inserting it into the article. Furthermore, the concept of image attachment in WordPress is unreliable and should not be trusted to be accurate.

If I decide to trust the connection between attached images and posts, then I can use a plugin to delete unattached images. But, be really sure that you’ve enabled the recycle bin feature (Trash) for the media library in order to recover any accidentally deleted items.

Don’t forget that you can always list all unattached images as a standard option in the Media Library.

Media Cleaner

One plugin for unattached images cleanup is the Media Cleaner by Meow. Again, make sure to read the tutorial and mandatory ENABLE Media Library Trash aka Recycle Bin feature on WordPress before using it.

A good resource on cleaning up WordPress Media Library is this article

DX Delete Attached Media

DX Delete Attached Media moves all attached media files to the trash when a post that they are attached to is deleted. The standard core behavior of WordPress only deletes the post and leaves the related images as “Unattached”. The risk of losing the images is minimized as images are still present in Trash folder.

Alternatives are: Delete Post with Attachments and Autoremove Attachments


How to stop the “bloat shit” in Media Library?

“Scaled” images?

Nothing removes “-scaled” images. It’s easy to stop them from getting created, but automatic removal is not possible. Just remove it using FTP or similar.

To disable “-scaled” images, deploy tiny PHP code (explained here or use an option named “Large image threshold” in Disable Generate Thumbnails plugin by Japanese minimalist.


Set Image Sizes

Verovatno je najbolje koristiti WP-CLI wp media image-size za spisak all registered image sizes

  • Ratio Thumbnails Size specify the ratio of thumbnails generation, od omiljenog Japanskog autora minimaliste.

Regenerate Thumbnails

regenerate featured images, rebuild all image sizes

  • AJAX Thumbnail Rebuild: latest version on breiti/ajax-thumbnail-rebuild; probably the best for huge quantity of files; Review: “no other regeneration plugin would come close to finishing the process. This did the trick!"; the best functionality of regenerating single image thumbnail (but no option to regenerate in “List View” and there is no option to do multiple file regeneration)

  • Regenerate Thumbnails; the author of this plugin passed away but his plugins will be maintained by Automattic and members of the WordPress community; 1+ million downloads; regenerate single image but by opening a URL;

  • Bulk Generate Thumbnails; is actively maintained; respected author that cherish minimalism; simple results table helps me detect broken attachments; no option to regenerate single images

  • Force Regenerate Thumbnails; probably abandoned plugin but it has best options to regenerate in “List View” (better than)

  • Paid plugin Real Thumbnail Generator by experienced author; has free lite version on WordPress.org; has everything I need except it creates folder structure as subfolder of current location - need explaining

Možda je ipak najbrže i najbolje da koristim WP-CLI komandu wp media regenerate see, iako to mogu samo ako imam direktan pristup serveru


Enrich Columns in Media Library List-View

These plugins will give you more detailed information about each image, mostly as new columns in the Media Library list-view, and will help you better organize and manage your media library.

I’ll also here list some plugins that deal with minor aspects of the Media Library behavior.

Media Metadata List

One such plugin is the Media Metadata List which enriches the Media Library list view with some additional data read from the images, by my favorite Japanese minimalist author.

EXIF Details

Exif Details allows you to collect more data from an image, such as information about the camera used to take the photo, and the date and time the photo was taken and this data can then be used in some other or some custom plugin.

Media Library Filter

Media Library Filter will work for “attached” media. It filters the media in your library by the taxonomies and terms with which they are associated.

Edit Thumbnails

There is no need for a special plugin as WordPress already does this natively. Since it is not very logical or obvious, it is necessary to read a short guide on How to Crop and Edit WordPress Post Thumbnails.

Therefore, plugins such as Thumbnail Editor or Post Thumbnail Editor which serve to manually crop thumbnail images one by one are completely unnecessary.


Interesting tweaks

WP Better Attachments | DHolloran/wp-better-attachments is a plugin that I believe no longer has much relevance and is therefore abandoned. It improves the way WordPress works with post attachments, allowing you to add, edit, attach, un-attach and sort the files attached to your WordPress posts, all from within the post editor.

WP Users Media will disable the ability for users to access other users media files, only their own.

Duplicated Media Files

Media Deduper is also a plugin that I am not sure how often I will need, as it identifies duplicate assets and also prevents new duplicates from being added to the media library in the future. Note that duplicate identification is based on the data content of the files themselves, not image metadata.

LH Copy Media File is a plugin that I don’t think I will ever need and which creates duplicates of images in the media library.

date 05. May 2020 | modified 25. Jan 2023
filename: Plugins » Uploads & Media » Management » Essential Operations