Skip to Content

AEM: Deleting Image and Document Files

Keeping your file structure neat and tidy is a great practice to follow.  If your Content Finder only holds the files that you actually need on your site, you’ll spend less time searching for something you want to use or need to delete. So, here’s the process.

Let’s start with images.  This process works the same way for PDF files, too.

Sign in to AEM and navigate into your site.

Open your Sites browser tab and click the Assets link.

AEM-assets-links

Click on the extension-county-offices card.

AEM-assets-extension-card

Click on your county.

AEM-shared-county-cards

Open the appropriate folder to find the images.  We’ll use ANR.

AEM-assets-folders

Click the Enter Selection button in the top menu (little gray circle with a check mark).

AEM-enter-selection-icon

Click the image or PDF file, or for multiple files, simply click on them as well.  Let’s delete both an image and a PDF file.  They’ll turn blue when selected.

AEM-delete-image-pdf

Click the Trash icon.

AEM-delete-icon

In the Delete Asset box, the files will be listed. Click Delete.

AEM-delete-asset-box

The files will be deleted OR…

Note:  If you get the ‘One or more items(s) are referenced’ error message,  stop before you delete!  It means your file is used somewhere. Take a moment to double check that the file is not needed on any web page in your site and remove any links to it before moving forward.

AEM-delete-error-msg

A ‘Force Delete’ will delete the image or PDF file, but if the file is still linked on your website may cause either a ‘null’ space where the image was previously located (see below-right) or a broken link on the text the PDF file was linked to.

lightbulb

Best Practice: Make sure that your image has been deleted from your web page and the PDF text link unlinked from all web pages before deleting files from the Content Finder!

 

AEM-delete-image-box

To Continue Editing…

Now this next step is critical!! Before you move on to any other task, click the Exit Selection button in the top menu.  If you don’t click Exit Selection, you might find yourself ‘stuck’ in delete mode and unable to continue working in AEM! Once you click Exit Selection, you’re back in edit mode.

AEM-exit-selection-icon

We’re done!