Open Closed

I would like to ask about the CMS-Kit content editor #9486


User avatar
0
rexhxiao created

After uploading an image, if the user later removes this image data, the blog or page will end up with many unused images. How do you handle this issue?


1 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    The ABP CMS Kit does not provide an automatic mechanism to clean up or remove unused images that were previously uploaded and are no longer referenced in blog posts or pages. Uploaded files remain in storage even if they are not used in any content, which can lead to accumulation of unused images over time.

    To handle this issue, you would need to implement a custom solution. A typical approach is:

    1. Track image usage: When an image is uploaded, store metadata about where it is used (e.g., blog post or page ID).
    2. On content update or deletion: Check which images are no longer referenced in the content.
    3. Cleanup: Periodically or on-demand, remove images from storage that are not referenced by any content.

    This process requires custom development, as the CMS Kit does not include built-in support for orphaned file cleanup.

    Sources:

    • https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Index
    • https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Blogging
    • https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Pages

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on July 11, 2025, 11:35