Skip to main content
Business Central forum
Suggested answer

Tenant Media Table

editSubscribe (0) ShareShare
Posted on by 10


We have a Tenant Media table which has over 45gb of data in there, containing a mixture of image/jpeg, image/png and application/octet-stream Mime Type files.    The table has become too large and we need to clear this down or find out what keeps on populating this table. 

The content column on the Tenant Media and Tenant Media Thumbnail tables are blank. 

I have checked the Customers, Vendors, Items and Contacts pages and cannot find any images being used anywhere.   

Does anyone know how I can see where the media is being used?  Either functionally via Business Central or via VS Code? 



  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 59,978 Super User on at
    RE: Tenant Media Table

    Hi, I just did a simple test, hope it helps you.

    More details:



  • Gurpal Profile Picture
    Gurpal 10 on at
    RE: Tenant Media Table

    Hi Zhu

    Thank you for the reply, I've been looking into this one today and cannot see a way of exporting directly out of the Tenant Media table.  

    The link you provided assumes that you wish to export the current media object (such as a JPEG image) that is being used on a record to an OUTSTREAM object.

    In the example code in the link where it states:  myItemRec.Image.ExportStream(dataOutStream);

    I cannot see that there is any suitable field on the Tenant Media Table to use in place of "Image".

    Would I need to follow the example in this link:

    Working With Media on Records - Business Central | Microsoft Docs

    So that once I have copied each media field to a record in a new table, then use the example that was provided in the link you shared to export the media?  

    If you know of an easier more efficient way to do it, I'd love to hear it.


  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 59,978 Super User on at
    RE: Tenant Media Table

    Hi, I know this is not a good way.... You can export all contents using the following method. . . Then check what exactly is the problem. . But there is 45G. . .



    PS: In the previous version of BC, we could directly see the pictures in the Content on the Web Client, but now it doesn't seem to work.





    Hope this helps.



  • Gurpal Profile Picture
    Gurpal 10 on at
    RE: Tenant Media Table


    Item cards have no images.

    The lines on the Incoming Documents page do have attachments but they are not present on the Tenant Media table.

    Posted Sales Invoices and Posted Purchase Invoices do have attachments showing on the Tenant Media Table dating back to 2019.

    So I think that pretty much answers why the Tenant Media table is so large

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 20,984 Super User on at
    RE: Tenant Media Table


    can you please check if any images added to the items card, incoming documents, any attachments in posted invoices either sales and purchases?

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,080 Super User

Martin Dráb Profile Picture

Martin Dráb 222,601 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans