Does anyone have any code, that deletes orphaned images from the Umbraco CMS. I need to do a bit of house keeping and it would be good to have this option.
Thanks for this, although I need something that can do it in bulk. Something to loop through all files in the media folder and delete the files that are no longer in use.
Removing orphaned images
Hello,
Does anyone have any code, that deletes orphaned images from the Umbraco CMS. I need to do a bit of house keeping and it would be good to have this option.
Many thanks
Paul
It won't be fully comprehensive (e.g., if a link to an image is hardcoded), but the Nexu package may work for this: https://our.umbraco.org/projects/backoffice-extensions/nexu/
Hi Nicholas,
Thanks for this, although I need something that can do it in bulk. Something to loop through all files in the media folder and delete the files that are no longer in use.
Thanks
Paul
is working on a reply...