Rename attachment filenames to "attachment ID" on upload
-
I am setting up a photo directory, I would need photo URLs to be absolutely clean and not dependent upon users changing their post title. I believe ATTACH-ID to be a reliable data, much more reliable than others in order to grant a lifelong URL.
I would like to change the way WordPress rename uploaded files on upload. As I upload an image whose filename is “see-sunset.jpg”, WordPress will set up scaled versions and rename filenames to different combinations of “/2013/11/see-sunset-{WIDTHxHEIGHT}.jpg” (dipending on thumbnail sizes).
Would be possible to add a function or a filter to change “see-sunset” for “{ATTACH-ID}” so that the final URL (on uploading) is going to be “/2013/11/{ATTACH-ID}.jpg” for the main image and “/2013/11/{ATTACH-ID}{WIDTHxHEIGHT}.jpg” for scaled ones.
Thank you
The topic ‘Rename attachment filenames to "attachment ID" on upload’ is closed to new replies.