[wp-trac] [WordPress Trac] #44127: editing an image can result in intermediate sized images left over after the image is deleted
WordPress Trac
noreply at wordpress.org
Thu May 17 19:51:02 UTC 2018
#44127: editing an image can result in intermediate sized images left over after
the image is deleted
--------------------------+-----------------------------
Reporter: pbiron | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.9.5
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Steps to reproduce:
1. set thumbnail_size to `150x150`
1. upload a `300x300` image, e.g., `foo.jpg`
* will result in `/wp-content/uploads/foo-150x150.jpg` being generated
1. edit the image and scale to `200x200`
* will result in something like `/wp-
content/uploads/foo-e1526583456941.jpg` being generated
* `/wp-content/uploads/foo-150x150.jpg` will still be present, since it
is still a valid thumbnail for the scaled image
1. regenerate intermediate sized images (e.g., by calling
[[https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/|wp_get_attachment_metadata()]]
followed by
[[https://developer.wordpress.org/reference/functions/wp_update_attachment_metadata/|wp_update_attachment_metadata()]],
which the [[https://wordpress.org/plugins/regenerate-
thumbnails/|Regenerate Thumbnails]] plugin does)
* will result in something like `/wp-
content/uploads/foo-e1526583456941-150x150.jpg` being generated
1. "Delete Permanently" the image
Check `/wp-content/uploads` and you will see that `foo-150x150.jpg` is
still there.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44127>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list