Copied to clipboard

Flag this post as spam?

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


  • Mladen Macanovic 22 posts 45 karma points
    Nov 12, 2010 @ 11:12
    Mladen Macanovic
    0

    ImageGen not working

    Trying to make imagegen to work for a whole day without success. The problem is that I can't see the images.

    If I try to use designit gallery like this

    <umbraco:Macro folderId="[#mediaPicker]" ThumbWidth="200" ThumbHeight="150" LightBoxWidth="600" LightBoxHeight="500" Alias="Designit.Gallery" runat="server"></umbraco:Macro>                 

    the links are visible but not the images. Also if I try to click the link it throw me an error saying "The resource cannot be found" and requested url is "/umbraco/ImageGen.ashx".

    When I use my own macro to generate the links, the same thing happen, excpets that I can open these images.

    <a id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_DRHomepageSadrzaj_ShowGallery_3_repImages_ctl01_hlImage" title="img1" href="/umbraco/ImageGen.ashx?image=~/media/858/image3.jpg&amp;width=600&amp;height=500&amp;constrain=true"><img id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_DRHomepageSadrzaj_ShowGallery_3_repImages_ctl01_img" src="/umbraco/ImageGen.ashx?image=~/media/858/image3.jpg&amp;width=200&amp;height=150&amp;constrain=true" alt="img1" style="border-width:0px;" /></a>
        
    <a href="/mypage/media/858/image3.jpg"><img src="/umbraco/ImageGen.ashx?image=/mypage/media/858/image3.jpg&amp;width=300&amp;height=300&amp;constrain=true" alt="/mypage/media/858/image3.jpg" /></a>

    I really don't have any idea what to do. I know I'm missing something stupid.

    if anyone have any idea please help.

  • Mladen Macanovic 22 posts 45 karma points
    Nov 12, 2010 @ 11:15
    Mladen Macanovic
    0

    I forgot to mention. First link is generated using designit, second is by using my own xslt.

  • Kevin Farrow 46 posts 67 karma points
    Nov 12, 2010 @ 11:36
    Kevin Farrow
    0

    Have you tried using just the ampersand i.e. "&" instead of "&amp;" in the parameters? i.e.

    <a href="/mypage/media/858/image3.jpg"><img src="/umbraco/ImageGen.ashx?image=/mypage/media/858/image3.jpg&width=300&height=300&constrain=true" alt="/mypage/media/858/image3.jpg" /></a>


    I've not used the deisgnit gallery but if the images are stored in the Media section then the path to the image should be:

    /media/858/image3.jpg

    and not have the /mypage part of the URL?

    Regards,
    Kevin

  • Mladen Macanovic 22 posts 45 karma points
    Nov 12, 2010 @ 11:49
    Mladen Macanovic
    0

    When I try to use &" instead of "&" I cannot save xslt, and if I save it using skip error it throw me " Error reading XSLT file: \xslt\DRGalleryFolderSub.xslt". Maybe there is some special syntax I need to write so I can use &" instead of "&"?

    If I don't use /mypage, than the url is not valid and the image is not accessible.

  • Kevin Farrow 46 posts 67 karma points
    Nov 12, 2010 @ 11:56
    Kevin Farrow
    0

    you could use <xsl:text></xsl:text> something like:

    <a>
    <xsl:attribute name="href">
    <xsl:text>/umbraco/imagegen.ashx?image=</xsl:text><xsl:value-of select="umbraco.library:GetMedia(./@link,false)/umbracoFile"/><xsl:text>&amp;maxheight=700</xsl:text>
    </xsl:attribute>         
    <img>
    <xsl:attribute name="src">
    <xsl:text>/umbraco/imagegen.ashx?image=</xsl:text><xsl:value-of select="umbraco.library:GetMedia(./@link,false)/umbracoFile"/><xsl:text>&amp;width=80</xsl:text>
    </xsl:attribute>
    </img>
    </a>

  • Mladen Macanovic 22 posts 45 karma points
    Nov 12, 2010 @ 12:05
    Mladen Macanovic
    0

    I'm already using <xsl:text></xsl:text> to write the values.

    I tried your solution but still no success. Maybe the problem is somewhere else and not in the xslt?

Please Sign in or register to post replies

Write your reply to:

Draft