Note that there is almost always more than one way to accomplish a task. This is simply the currently recommended way to handle backup and delete images on large sites. This workflow is designed with the following goals:
- Improve backend performance while managing images on large sites (eg: sites with 10,000+ images)
- Reduce the number of duplicate/obsolete/unwanted images that might clutter up the management interface and make it harder to find the content you are actually looking.
- Reduce the likelihood of referencing duplicate images on the live site
- Safeguard against accidental deletion of images from the live site that should not actually be deleted (note: this method will not prevent them from being deleted but will preserve a copy which may be manually re-uploaded later if needed)
- Save time while backing up and deleting images, which may be a lengthy process on a site with too much content.
Process Overview
- Find and select the images to delete
- Tag the images
- Export the images and download to a secure location
- Trash the images
- Repeat and check the live site
- Purge the trash and wait for the purge to complete
- Verify the live site and management interfaces one more time
- Recover the deleted images, if necessary
Detailed Steps
- Navigate to Content => Images
- Filter by "Not Referenced"
- These images are not 100% guaranteed not to be used on your site but tends to be fairly reliable (ie: they may be pulled dynamically or may have been referenced in another way that is not tracked by the system).
- After deleting the "Not Referenced" images, you may decide to delete other images as well - which is OK so long as the objects referencing them are not published, they are referenced in fields that are not displayed, or you don't mind them being removed from your site (eg: old/archived content that you do not care about, obsolete images that are no longer accurate, etc...).
- Optionally, filter by folder.
- This may both make the interface faster and make it easier to identify unwanted images - depending on how the images are organized on your site.
- Select the images that you want to delete.
- If you want to select a large number of images at once, switch from the "icon" view to the "list" view, where you can change the number of records that are shown at a time up to a maximum of 200.
- Instead of immediately trashing the images, click on the "Add Tags" toolbar button. You may need to click on the dropdown next to "Add Authors" to see this option.
- Create a new tag for images that you want to delete (eg: "Marked for Delete"). Select that tag, which will update the selected images with it.
- Continue selecting images and tagging them until you are satisfied that you have selected and tagged enough images.
- Navigate to Site => Exports
- Click on "New" to create a new export
- Give it a descriptive name (eg: "Images to delete - 2024-06-24-batch1").
- Set "Format" to "CSV"
- Optionally uncheck "Expires". If checked, the export will automatically be deleted at the specified date and time. This may be useful to keep your site clean so long as you back up the exported file on your computer first. Or keep it unchecked and manually delete the export when you are ready.
- Click the checkbox next to "Image"
- In the dropdown to the right of "Image", select "Filter".
- Select the tag that you used for the images to delete.
- Alternatively, you can select "Selection" instead of "Filter" which gives you more control but may take longer since you will have to select all of the images twice - once for the export and once to trash them.
- In the "Advanced" section at the bottom of the "New Export" dialog, click the checkbox next to "Zip Files"
- Leave all other options at their default.
- Click "Save"
- Close the "New Export" dialog. You should now see the new export at the top of the exports list.
- Click on the "Run" button next to the new export (it looks like a "redo" icon).
- When the export is complete, you can download it to your computer.
- After the export is complete, navigate to Content => Tags. Click the "Browse" button to the right of the tag containing the images to be deleted.
- Select all of the tagged images (the "Select All" checkbox is particularly helpful for this)
- Click "Trash"
- Repeat the above steps as many times as necessary to make content management easier, until you either run out of images to remove or time to remove them.
- Confirm that you site still looks good (ie: that you didn't trash images that should have been left alone).
- Navigate to Site => Trash.
- Select all and Purge (will have to repeat for 200 images at a time).
- Wait 15+ minutes
- Confirm again that you site still looks good. If you deleted a significant number of images, you can also now confirm that the management interface is faster when working with images.
- If you need to recover a deleted image:
- Identify which exported file contains the deleted image. If you do not know which export contains the desired file, you may need to work your way through each one until you find the file.
- Unzip the exported file on your computer.
- If you know the filename, try searching by filename. You may either open the .csv file (eg: in excel) and searching for your desired filename or open the "image" folder. If the files have been unzipped your operating system may show you thumbnails of your image which may also be helpful in locating your desired file.
- Once you have found the image you need, upload it to Marketpath CMS and update your site to display the "new" image wherever it is needed.