Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I use Umbraco 7.5.3 with a WebForms template. I uploaded an image to Media Content and I try to get it inside the template by:
<umbraco:image runat="server" field="bannerImage" />
as referenced here: Masterpages - Umbraco Image
It should output something like:
<img src="/media/1009/imagename.jpg" />
But what I am finding in my browser is:
<img src="{src: '/media/1009/imagename.jpg', crops: []}">
The image is not rendered. Can I make it working correctly somehow?
Thanks.
Ok. It is solved.
I went to XSLT and grabbed my image:
<xsl:variable name="image" select="umbraco.library:GetMedia($imageId,0)"/>
Then converted inner XML of umbracoFile which is apparently JSON to XML:
<xsl:variable name="mySrc" select="umbraco.library:JsonToXml($image/umbracoFile)"/>
And used it as src attribute:
<img> <xsl:attribute name="src"> <xsl:value-of select="$mySrc/src" /> </xsl:attribute> ...
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Media Picker Field in WebForms Template Umbraco 7.5.3
Hi,
I use Umbraco 7.5.3 with a WebForms template. I uploaded an image to Media Content and I try to get it inside the template by:
as referenced here: Masterpages - Umbraco Image
It should output something like:
But what I am finding in my browser is:
The image is not rendered. Can I make it working correctly somehow?
Thanks.
Ok. It is solved.
I went to XSLT and grabbed my image:
Then converted inner XML of umbracoFile which is apparently JSON to XML:
And used it as src attribute:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.