WordPress.org

Ready to get started?Download WordPress

Forums

Can file names be changed automatically upon upload? (2 posts)

  1. danielfein
    Member
    Posted 2 years ago #

    Hi,

    Is there a way that when you upload an image to wordpress, it automatically changes the image name in the server?

    For instance if I upload this image:

    thisismyimagename.jpg

    can it automatically change the image name to

    sitename-image-1.jpg

    and then sitename-image-2.jpg for the next image?

    Thanks!

  2. Mark / t31os
    Moderator
    Posted 2 years ago #

    Not exactly what you're asking, but this is a similar question, you should be able to adjust the code to suit your needs.

    wordpress.stackexchange.com/questions/5505/rename-files-during-upload-using-variables

    Or if that's a bit too much to follow, there's a similar example of renaming here.

    djzone.im/2011/01/change-uploaded-filename-in-wordpress-media-library/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.