MediaReference and UIHint



I'm having some trouble using UIHint for MediaReference without loosing the original edit functionality.

If I use


the custom display template is used when rendering, but the edit functionality reverts to the "click here to edit" button.

If I use

[UIHint("ResponsiveMedia", PresentationLayer.Website)]

the custom template is not used at all. What am I doing wrong here?

Some additional background info:
I'm working on a site where some of the images should be scaled down depending on screen resolution, while others should just render as normal. The latter case is implemented as described here. For the former case I have added an additional display template "ResponsiveMedia.cshtml", and want to use this template for the applicable MediaReferences by annotating them with the UIHint attribute.

Is there perhaps a better way to achieve what I want?

Nov 11, 2014 12:25

Should add that the site uses EPiServer 7.5 and ImageVault 4.4

Nov 11, 2014 12:29


If you want to have the normal ui behavior for the edit you can specify the following uihints.


Edited, Nov 12, 2014 13:52

Ah, that works. Cheers!

Nov 12, 2014 15:43
* 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.