ClassicPress PetitionsClassicPress Petitions
This is a read-only archive. Post or comment on the live version of this page on our forums.

Allow renaming of file names in Media Library

January 6, 2019 · 15:42 · Viktor Nagornyy

Users should be able to rename files as needed inside Media Library easily.

+8 more
James Nylen

This is kind of difficult to implement, because all references to an existing image would have to be updated in the post_content of any posts where they appear.

Here's an idea for a way around that, from Greg Schoppe on

> Perhaps image tags in content could be replaced by an image shortcode, which renders based on image ID and a set of attributes.

Fabian Wolf

The other option would be to add a symlink to the new file name. Most modern OSes support that, so it shouldn't be an issue whether this would happen on Unix-oid OSes or Windows (also see eg. )

cu, w0lf.

Viktor Nagornyy

It would be up to the user to change any references to the old name. We can provide a quick alert/warning.

Right now, if user wants to re-name the file. They will delete current file, and upload a new file with a new name. So the problem of updating references is still there.

This is primarily to help quickly fix typos without the need to delete and re-upload files. Maybe fix image names from default names from the camera/phone to something more SEO friendly.

This would be similar to permalink slugs. It is users' responsibility to make sure they have a proper redirect from the old to the new permalinks if needed.

Fabian Wolf

@viktor: Or optionally create a symlink, to avoid running in errors. Or optionally a redirect - depending on the FS allowances.

Viktor Nagornyy

I don't know if automatic redirects would be the best thing. I hate when I have to hunt down existing slug because my post or page slug is getting -2 added. And with files, I wouldn't like unnecessary redirect.