WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a plugin or a "hack" that can help me do this? I have spent hours try to figure this out so I would greatly appreciate nay help. I have WP 3.1 running php5 Thanks!

eg.: postitle_image-ID.jpg

share|improve this question
up vote 2 down vote accepted

Hook into the filter 'sanitize_file_name'. See my plugin Germanix URL for a working example.

A plugin doing this is Rename Media.

share|improve this answer
i search for a plugin, that renames the files during upload. – mate64 Apr 25 '11 at 17:43
@msec I made an update to my answer and recommended a plugin. – toscho Apr 25 '11 at 17:52

There is also Media File Renamer, and it does a bit more than Rename Media.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.