Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rachael Parker 12 posts 32 karma points
    Oct 21, 2011 @ 12:38
    Rachael Parker
    0

    ImageGen will only work on some pages

    Hi,

    I have an Xslt file containing

      <xsl:choose>
      <xsl:when test="count(./propertyImages/MultiNodePicker/nodeId) &gt; 0">
         <xsl:variable name="media" select="umbraco.library:GetMedia(./propertyImages/MultiNodePicker/nodeId[1], false())" />

             <img src="ImageGen.ashx?width=183&amp;height=183&amp;image={$media/umbracoFile}" />
      </xsl:when>
      <xsl:otherwise>
        <img src="ImageGen.ashx?width=183&amp;height=183&amp;image=/images/placeholder.png" />
      </xsl:otherwise>
    </xsl:choose>

     

    however I can't get ImageGen to work. Just putting

             <img src="{$media/umbracoFile}" />

    displays the image so I know the xslt is getting the correct path. I just need to resize it!

    any ideas what I've done wrong? This code works perfectly in other areas of my site so i'm a bit confused!

    thanks

    Rachael

  • Rodion Novoselov 694 posts 859 karma points
    Oct 21, 2011 @ 12:42
    Rodion Novoselov
    0

    Hi. It seems that you simply generate a relative url. Try to write src="/ImageGen.ashx?blablabla" (with a slash in the beginning of the url).

  • Rachael Parker 12 posts 32 karma points
    Oct 21, 2011 @ 12:56
    Rachael Parker
    0

    had tried everything but that! 

    Thank you, that's the second time you've saved me from going mad :)

  • 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.

Please Sign in or register to post replies