[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 20:04:57 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 | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by pbiron):
There are probably a number of ways to address this but my suggestion is:
1. in
[[https://developer.wordpress.org/reference/functions/wp_save_image/|wp_save_image()]],
augment the `_wp_attachment_backup_sizes` postmeta to contain the info in
the `sizes` portion of the `wp_attachment_metadata` postmeta
2. in
[[https://developer.wordpress.org/reference/functions/wp_delete_attachment/|wp_delete_attachment()]],
use that augmented info to delete the files that are currently not being
deleted
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44127#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list