• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 574
  • Last Modified:

How do I automatically rename images in WordPress

I would like to automatically rename images in WordPress according to the title of the article I am uploading them to. Is there a plugin to do this automatically? I am running a multi-site WordPress site and would like this to be default behavior on all sites.
If there isn't a plugin, is there something I can do to the core of WordPress to make this be default behavior?

Thank you.
OAC Technology
OAC Technology
  • 2
1 Solution
Jason C. LevineNo oneCommented:
There's a couple of different ways to do this and the method you choose will depend on your comfort level with PHP and WordPress coding.  

Under no circumstances should you hack the core as the hack will break as soon as WordPress updates.

The first thing I would try is looking at an older plugin: Upload+


As it supports renaming of files on upload.  You will have to customize it to get exactly what you want though.  A more recent plugin that renames files (and is more active) is this one:


I have a feeling that slamming those two together will get you closer to what you want.
OAC TechnologyProfessional NerdsAuthor Commented:
Media File Renamer is close, but instead of setting the file name of the file to be the title I give it when uploading, I want the file name to be the title of the post I am uploading to. Upload+ looks like it only date stamps images, which isn't really what I'm trying to do either.
Jason C. LevineNo oneCommented:
In that case I think you might want to look at Advanced Custom Fields instead and sort of bypass the media uploader and plugins that affect it in favor of uploading the file to a custom field.  With a fair amount of extra coding, you should be able to pull the current title and rename it.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now