id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses
20666,Custom header image cropping can create identical attachments,SergeyBiryukov,ryan,"1. Add an image to Media Library which requires cropping.
2. Go to Appearance → Header, click ""Choose from image library"".
3. Select the image from point 1, click ""Set as header"", ""Crop and Publish"".
4. Press browser's Back button, click ""Crop and Publish"" once again.
5. Delete one of the two identical ""Header Image"" attachments in Media Library.
6. The other attachment is now orphaned (the files are deleted in point 5).
Sounds like `wp_unique_filename()` should be used in there somewhere.
Related: #19840, #20657",defect (bug),closed,normal,3.4,Customize,3.4,normal,fixed,has-patch,,