Copied to clipboard

Flag this post as spam?

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


  • Frederik T 241 posts 372 karma points
    Dec 21, 2011 @ 12:22
    Frederik T
    0

    Getting image from url without file extension

    i have this xslt that uses pictures with an url like so: http://www.mysite.com/image_db.asp?ID=12345

    works fine by its own in an img tag, but combined with imagegen, nothing shows up. I guess it either doesnt work because there isnt any kind of indication that its a picture (like no .jpg/.png etc.) or i am missing something?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Dec 21, 2011 @ 13:45
    Douglas Robar
    0

    Hi, Frederik,

    The issue is that ImageGen assumes the image= parameter is a local file. In your case it is a custom image handler. This is easy to use with ImageGen Professional - you simply need to include the full url (and domain) to your image handler and all should be fine.

    Your img tag's src= parameter would be something like this:

    /imagegen.ashx?width=100&image=http://www.mysite.com/image_db.asp?ID=12345

     

    This post is also good background reading to understand some of the issues and save you time if you run into problems.

    http://our.umbraco.org/projects/website-utilities/imagegen/imagegen-bugs/23663-File-Not-Found

    cheers,
    doug. 

  • Frederik T 241 posts 372 karma points
    Jan 13, 2012 @ 12:22
    Frederik T
    0

    Late reply, but i finally got around and have the department buy a license for imagegen pro. The key is installed and tested that pro works.

    But it still didnt solve the problem in my original post for some reason.

    It is a little complicated but the end resulst suggests that it should be working.

    An xslt generates a list of people, those people are gathered from a webservice XML document. each person element has an "ImgUrl" element which in the for-each loop is outputted simply like this:

    <img src="{ImgUrl}" title="sample"/>

    and that works fine. now if i use it with imagegen like so:

    <img src="/ImageGen.ashx?image={ImgUrl}" title="sample"/>

    It doesnt work even though the outputted html is like this:

    <img class="ui-li-thumb" title="sample" src="/ImageGen.ashx?image=http://www.mysite.com/image_db.asp?ID=134918">

    it looks like the syntax is correct but nothing appears.

    Very odd indeed, but im sure i have overlooked something somewhere.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 13, 2012 @ 12:33
    Douglas Robar
    0

    That does look correct so nothing immediately obvious. Any chance I can get a live url to the image so I can see it in action? That would help a lot.

    If you're uncomfortable posting the url here you can send it to me via my website's contact form (http://www.percipientstudios.com/about/contact.aspx)

    cheers,
    doug. 

  • Frederik T 241 posts 372 karma points
    Jan 13, 2012 @ 12:57
    Frederik T
    0

    Thank you for your time. Ive sent an example url using the contact form you posted above.

    I have a suspicion it might be a problem on our end, though i dont know how.

  • Frederik T 241 posts 372 karma points
    Jan 13, 2012 @ 13:58
    Frederik T
    100

    So just want to report back in case anyone else see's this thread, apparently it WAS an error on our side. To use images located on an external server, the host must be whitelisted in the imagegen.config:

    <RemoteDomainWhiteList>
       <Domain>www.mysite.com</Domain>
    </RemoteDomainWhiteList>
  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 13, 2012 @ 14:01
    Douglas Robar
    0

    Glad to have helped you get it working. Thanks for sending me the url, that made it much easier to resolve.

    cheers,
    doug. 

Please Sign in or register to post replies

Write your reply to:

Draft