1

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

user14129
  • 11
  • 1

1 Answers1

2

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

Example:

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

Hope this helps :)