WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 6 months ago

#43152 new defect (bug)

Image remains in page after deleting from Media Library

Reported by: ahortin Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.9.2
Component: Media Keywords: needs-design
Focuses: Cc:
PR Number:

Description

Whilst editing your page, if you open the Media Library (using the Add Media button), and then delete an image that is currently added to the page, the image remains on the page after closing the pop-up window.

To Reproduce:

  • Insert Image on Page
  • Click Add Media button to display the Media Library popup Window
  • Select the image that you previously inserted on the page and delete the image
  • Close the media pop-up window
  • Image that was deleted remains on page

Here's a gif to show an example - https://cl.ly/1I2r3q3H301J

I originally raised this as an issue with Gutenberg, but it was suggested to raise it here since it's also an issue with the classic editor.

Change History (1)

#1 @joemcgill
6 months ago

  • Keywords needs-design added
  • Milestone changed from Awaiting Review to Future Release

Thanks @ahortin. This has been the expected behavior in core for a long time, since it's not always clear that deleting an image from the media library can delete the file from the server. However, in some cases—like when there is a CDN involved—the file can still be served to end users after the image is deleted from the media library so we'd want to be careful about affecting published content.

This whole flow could likely use some UX feedback so I'm going to mark if for design for now.

Note: See TracTickets for help on using tickets.