Try our conversational search powered by Generative AI!

ImageVault 4 MetaData


How can you retrieve MetaData when using the property MediaReferenceList in Episerver CMS 7 MVC

Oct 02, 2013 10:34

I would recommend to use a custom class where you define all metadata and formats you would like to retrieve.

public class MyMedia : MediaItem {
[Metadata("Title")] public string Title { getset; } [ResizeEffect(150,150,ResizeMode.ScaleToFill)] public Thumbnail Thumbnail { getset; } }

Then I would use this class to retrieve the media based on the selected data in the MediaReferenceList.

var client = ClientFactory.GetSdkClient();
 mediaList = client.Load<MyMedia>(mediaReferenceList.Select(m => m.Id)).ToList();

You can see more examples at



Edited, Oct 02, 2013 11:57

For further questions about ImageVault you can access the ImageVault forum here at episerver world

You'll get better attention there.


Oct 02, 2013 11:59

When i try to implement the class i get this error message

"cannot access protected constructor 'MetaData' here"


any ideas?

Oct 02, 2013 12:07

You have to use the following using statements


using ImageVault.Client;
using ImageVault.Client.Descriptors;
using ImageVault.Client.Descriptors.Effects;
using ImageVault.Common.Data;
Oct 02, 2013 13:18
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.