How to get image src from an Image field

I was wondering how to get at src atribute of an Image field in Sitecore,.. her’s an exsample of what data you can find in the Image field..

<image showineditor=”1″ mediaid=”{6WB581DF-395F-400B-A8F2-98690D18AD10}” mediapath=”/Images/yourImage” src=”~/media/Images/yourImage.ashx” />

so if you do a xsl value-of you’ll get this in stead of the image src,.. and that is just not what i wanted ,.. so to solve this you can do folowing

<xsl:value-of select=”sc:fld(‘imageFieldName’, . , ‘src’ )”/>

and thats it (c:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: