What happens to assets when I delete an entry- are they removed too?
Deleting an entry in the CMS does not automatically delete the assets- images, PDFs, or other files- that were used in that entry. Assets and entries are separate objects. An entry references an asset; it does not own it.
Why assets are kept
An asset can be referenced by more than one entry. If assets were deleted automatically whenever an entry was removed, you could inadvertently remove files still in use elsewhere on the site. For this reason, deleting an entry leaves its associated assets untouched in the media library.
Cleaning up unused assets
If you want to remove assets that are no longer needed, you need to delete them manually from the Assets section of the control panel. Before doing so, confirm the file is not in use anywhere else- the CMS may warn you if you attempt to delete an asset still referenced by another entry or global.
The reverse is also true
If you delete an asset from the media library while it is still referenced by an entry, the entry will have a missing image or broken file link on the front end. This will not cause an error in the CMS itself, but it will result in broken content for visitors. Always check whether an asset is in use before removing it.
Why assets are kept
An asset can be referenced by more than one entry. If assets were deleted automatically whenever an entry was removed, you could inadvertently remove files still in use elsewhere on the site. For this reason, deleting an entry leaves its associated assets untouched in the media library.
Cleaning up unused assets
If you want to remove assets that are no longer needed, you need to delete them manually from the Assets section of the control panel. Before doing so, confirm the file is not in use anywhere else- the CMS may warn you if you attempt to delete an asset still referenced by another entry or global.
The reverse is also true
If you delete an asset from the media library while it is still referenced by an entry, the entry will have a missing image or broken file link on the front end. This will not cause an error in the CMS itself, but it will result in broken content for visitors. Always check whether an asset is in use before removing it.