Support » Fixing WordPress » Any way to create unique image id’s

  • I have multiple authors who are responsible for postings that include images added in custom fields. The problem is that many of the authors work for different divisions of the same company so they have the same image names (think basic names like 1.jpg, 2.jpg). What happens is that each time an author posts with an image that has the same name as an image that has been used before, that new image replaces the images in any previous posts with that same image name. I can tell the authors not to do this but it will keep happening. I am not sure if this is a bug in WordPress but I am looking for any way to fix this. It seems like each instance of an image uploaded with the same name should have a number or character appended to it so that each image will be unique.Alternatively, if an image were attached to a specific post something along those lines would work. Any ideas? Thanks for any help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’ve just run some tests on my local 2.9.2 install and uploaded 3 images files with identical filenames. In each case, subsequent uploads had a number appended to the filename. That suggests, to me, that you have a server issue , there’s something wrong with your install or there’s something interfering with the upload process.

    Any idea what would control this function so I can narrow it down?

    Do you have access to your server logs? If it’s a server config issue, then the upload might be throwing a warning which may be visible in the error log. You could try uploading a fresh copy of wp-includes in case there’s a problems with one of the files. Finally, the usual “deactivate all plugins/switch to the default theme” should confirm whether it’s a plugin or theme problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Any way to create unique image id’s’ is closed to new replies.