Make WordPress Core

Opened 5 years ago

Last modified 3 years ago

#40174 new defect (bug)

Found a bug in uploading image

Reported by: sanjaypopli3749 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 4.6.1
Component: Media Keywords: reporter-feedback
Focuses: Cc:



I found a bug while uploading image through media section. I uploaded an image and deleted that permanently. I uploading another image with exactly same name and image was uploaded successfully but i was not able to see new image. It was showing old thumbnail and old image in popup when i clicked that. One thing was good that when i clicked Edit button, it was showing new image.

Not sure this bug is removed in later versions of wordpress, if no then please look into this.


Change History (4)

#1 @jnylen0
5 years ago

My guess is that your browser was caching the old thumbnail. Can you try again, but clear your browser cache after uploading the new image?

#2 @swissspidy
5 years ago

Also, in any case, please try to see if it works in the latest version of WordPress'


#3 @SergeyBiryukov
5 years ago

  • Keywords reporter-feedback added

#4 @skorasaurus
3 years ago

  • Severity changed from normal to minor

Honestly, I was expecting to suggest closing this, but I was able to reproduce this, only in very specific circumstances:

This is on WordPress 5.1.

  1. upload media (I did this through wp media import filename.jpg)
  2. Delete the original photo from the file system (within uploads/) (if your photo is named filename.jpg; only delete filename.jpg; do not delete the resized images).
  3. upload media different media with same filename as step 1 (wp media import filename.jpg)
  4. Go to the media manager (sorry if this is the wrong term) (the url is wp-admin/upload.php); the original photo is still listed there.
  5. Click on the original photo's thumbnail to open 'attachment details' modal.

The original photo's thumbnail and the larger image are still present.

  1. Click "edit photo" at the bottom of the modal; the newly renamed image will then appear even though the url is for the first item's attachment ID (in my case, it was wp-admin/upload.php?item=20&mode=edit

If you delete the original photo through "Delete permanently" in the "attachment details" modal as is the recommended practice, the original photo does not appear in the media manager.

I did not try to reproduce this by uploading the photo through wp-admin/upload.php

Last edited 3 years ago by skorasaurus (previous) (diff)
Note: See TracTickets for help on using tickets.