[wp-trac] [WordPress Trac] #49042: After WordPress automatically scales your uploaded images down, it loses track of the original images
WordPress Trac
noreply at wordpress.org
Thu Dec 19 13:31:01 UTC 2019
#49042: After WordPress automatically scales your uploaded images down, it loses
track of the original images
--------------------------+-----------------------------
Reporter: pikamander2 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version: 5.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
WordPress 5.3's new image scaling feature seems to have an overlooked
issue.
1. Go to /wp-admin/upload.php
2. Upload a huge image.
3. WordPress will resize the image automatically and call your image
(filename)-scaled.jpg
4. Go back to /wp-admin/upload.php
5. Delete the image permanently
6. Upload a new image with that same filename
7. The new image will now have "-1" attached to the end of it, because
WordPress didn't delete the original (non-resized) image from the uploads
folder.
There doesn't appear to be any way to remedy this via the UI, and it's
bound to lead to both confusion and unnecessary files piling up on
people's servers.
The best solution here, I think, would be to store the name of the
original file somewhere (if it's not already being stored) and delete it
too when somebody deletes the scaled image.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49042>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list