Delete removed images using Folder Collections Media #5097
Labels
area: media-library
area: ui/editor
status: unconfirmed
type: bug
code to address defects in shipped code
possibly related to Delete path folder when delete entry #3615
Describe the bug
When using Folder Collections Media a folder is created for the post, images are loaded from and saved to this folder
They are not accessible to the media assets UI
When removing an image from the page it is not deleted from git
To Reproduce
In config.yml use a collection storing images in a folder for the post
Create a post with at least one image
publish
Edit that post and delete the image
Expected behavior
I would expect the image to be deleted from the post front matter and from git
What happens is that the image is deleted from frontmatter but not from git
You can replace the image in frontmatter with a new image but not remove the old one
You can't remove it via the media assets tool either as it isn't in the folder this looks at.
While the image isn't in frontmatter it may still be used by the site generator (eg Hugo still sees this as a valid Page Resource)
Applicable Versions:
netlify-cms-app 2.14.28
netlify-cms-core 2.38.6
netlify-cms 2.10.98
Gitlab
Ubuntu
Chromium Version 89.0.4389.82 (Official Build) snap (64-bit)
CMS configuration
Additional context
Using media folders per page works very well mainly - but there is a need to be able to manage these images.
The text was updated successfully, but these errors were encountered: