SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the itemstyle.xsl file to format a CQWP query on a page. Everything is working except that I want to fix the height and width of an image. I'm displaying the image with :

<xsl:value-of select="@PublishingPageImage" disable-output-escaping="yes" />

The output of this line is :

<img style="BORDER: 0px solid; " src="/SiteCollectionImages/theImage.gif" alt="">

Is there a way to set the width and height of the image on ? I'm not a big xslt expert... I couldn't find any example.

Thank you, Chris

share|improve this question

In your XSLT when you render the Image you can add attributes to that element.


<img src="{$ImageUrl}" title="blah" alt="blah">
    <xsl:attribute name="height">90px</xsl:attribute>
    <xsl:attribute name="width">150px</xsl:attribute>

Hope this helps :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.