Try our conversational search powered by Generative AI!

Find usage of Media Asset

Vote:
 

Hi,

We are looking for a way to identify where a media asset is linked to, so I'm looking to understand how does EPiServer determine asset usage when it displays the messages 'Changes made here will affect at least ...' and 'This item is not used anywhere'?

What our customer actually wants is a report on all assets which are not linked to anywhere, I suspect that we are going to need to report on the results of a scheduled job something like a reverse of the Link Validation job which would then need to query each asset to find usage (or lack thereof), so if anybody has any ideas on alternative approaches, then that would also be appreciated.

Thanks

#112726
Nov 04, 2014 15:21
Vote:
 

Hi,

You can find all links to a specific content by quering the ContentSoftLinkRepository. So if no links are found, the media content is not in use (hopefully). Media content may be in use, even if no other content links to it, e.g. you may have a block where the editor can chose a folder to list files from. Then there are no links to the files, but they are still in use.

#112733
Nov 04, 2014 18:57
Vote:
 

This was on the back burner for a while but we have eventually got around to implementing it.  Thanks Johan for that, perfect.   To report on this efficiently for the entire site we added some ContentReference extension methods which query the ContentSoftLinkRepository, we then include these in our EPiServer find index for instances of MediaData.

#114093
Dec 04, 2014 11:57
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.