Skip to content

Clear orphaned media

Orphaned media are pictures in the Business Central database that no record refers to anymore, for example after a record or picture was deleted. They take up space without being visible anywhere. Media Bridge can remove them manually or automatically.

When to use this

  • After migrating to External File Storage, to reclaim database space.
  • To keep the database clean while you use Tenant Media.

1. Prerequisites

  • You have the Media Storage Mgt. permission set.
  • The company manages its own pictures (not a consumer company).

2. Steps

2.1. Clear orphaned media manually

Available when the storage source is External File Storage.

  1. Search for Media Bridge Setup and open the page.
  2. Choose Clear Orphaned Media.
  3. A message shows how many orphaned media records were deleted.

2.2. Clear orphaned media automatically

Available when the storage source is Tenant Media.

  1. Search for Media Bridge Setup and open the page.
  2. In the Internal File Storage group, turn on Auto Clear Orphaned Media.

From then on, every time an item, item variant or employee is deleted, Media Bridge also removes the media that became orphaned.

3. Things to know

The clean-up covers the whole database

Business Central finds orphaned media for the whole database, not only for item and employee pictures. Any media that no record refers to is deleted, also media left behind by other apps. Media that is still in use is never deleted.

  • The orphan search scans the whole database, so it can take a while in a large environment. That's why the automatic clean-up is off by default.
  • A picture that was migrated to External File Storage without Delete Source After Transfer is still referenced by its record, so it is not an orphan and is not removed by this tool. Run a migration with Delete Source After Transfer to clear those.

4. Verify

  • The message after step 2.1 shows the number of deleted records.

5. Common signals you may need this procedure

Orphaned media cleanup is not available because this company uses a media source company.

Run the clean-up in the source company.

6. When to contact The Framework

  • Pictures disappear from records after an orphan clean-up.