Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I got the following problem:
If i delete a media type item the image which is used inside this media type item is not deleted and still exists.
How can i achieve that this images is also deleted
Are you referring to the fact that when you delete a media node, the image remains on the hard disk? If so this is the default Umbraco behavior unfortunately. To remove the file you have to click the "remove file" checkbox and Save before you actually delete the node.
However, one could write an Event that automatically deletes the physical file when the node is deleted, pretty easily. There's an example in this post
There are also some packages that aid in finding "rogue" images and deleting them. FALM Housekeeping comes to mind but if I recall it only works when you using the flat media structure (ie /media/1111-file.jpg instead of /media/1111/file.jpg). I also think Richard Soeteman is working on a SiteAnalyzer package which will assist with this (although I think it will be commercial).
Events are probably the best way to go if this is an issue for you.
I'm also facing same problem in umbraco v 4.5.2. Any solution please?
i just tried it. If i check "remove image" the folder with the id still exists. Also if i delete the media type item.
How can i delete the whole media item (including image, media folder) etc.
You would need to write a custom event to handle this, using the OnBeforeMediaDelete trigger. In here you could look up the umbracoFile property and delete the file & folder. Not sure if you are familiar with C# or not but here are some good starting points on Events:
http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-eventshttp://www.richardsoeteman.net/PermaLink,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx (appears to be down at the moment)
And as I mentioned earlier a similar example
i do not know c# so it is very hard for me to handle this
Thought there must be an easier solution to delete images completly :-(
sorry if you have done this already, but have you emptied the recycle bin in the media section?
deleted items are still contained in the recycle bin. emptying should get rid of the folders and the images.
i have just tested on one of our sites and images and folders are removed completely.
if this still does not work - perhaps a permissions issue??
i just tryed it but the empty folder still exists
Nine years later this is still an issue.
I need something that will check for unused images and delete them from disk. Also check for empty image nodes and delete them if there's no file on disk. (V7)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted