Copied to clipboard

Flag this post as spam?

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


  • Evan 344 posts 99 karma points
    Apr 21, 2009 @ 22:34
    Evan
    0

    Weird IE problem displaying my image...

    I have this code written to show an image that is uploaded to my "home page" and display it on all child pages. It works great in FF but it is a broken image in IE, has to be something simple I am over looking. Any help would be great.

    Code:
    [code]





    [/code]

    Like I said it works perfectly in FF but is a broken image in IE

  • Tim Rice 3 posts 23 karma points
    Sep 01, 2009 @ 17:52
    Tim Rice
    0

    Try changing this...

    <img src="{$rootNode/data[@alias='companyLogo']}" />

    to this...

    <img src="http://{$rootNode/data[@alias='companyLogo']}" />

  • dandrayne 1138 posts 2262 karma points
    Sep 01, 2009 @ 18:02
    dandrayne
    0

    If that doesnt work, output this and see what it says

    <xsl:copy-of select="$rootNode/data[@alias='companyLogo']" />
  • Ron Brouwer 273 posts 768 karma points
    Sep 01, 2009 @ 18:03
    Ron Brouwer
    0

    If that won't work please provide the source generated by your xslt.

    Ron

    ps. You might want to consider adding an alt attribute for accessibility.

  • tla 35 posts 71 karma points
    Sep 02, 2009 @ 14:48
    tla
    0

    I normally use the following when I add images - in parts because I tend to swap between thumbs and the real size image:

    <xsl:variable name="SiteURL" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))"/>

    <xsl:variable name="photo" select="umbraco.library:GetMedia(current()/data[@alias=photo], 'false')/data[@alias='umbracoFile']"/>
        <xsl:variable name="photoThumbnail" select="umbraco.library:Replace($photo, '.jpg','_thumb.jpg')"/>
        <img alt="" src="{$SiteURL}{$photo}" ></img>

     

    It can also provide a way to test on urls etc if needed.

     

    I did, however, recently run into a problem like yours: Not all the images that the customer had uploaded was displayed. So, after checking that the image was really there, that the src was correct and all, I checked the image format. Turned out that some of the images were in CMYK format and not RGB. CMYK is used for printing, not for computers but companies sometimes include images in these formats as the people in the PR departments normally do not know the difference.

     

    Firefox is not aware of the difference neither, so it happilly displays both, but IE does not. So, if your code is working, try checking the image format

Please Sign in or register to post replies

Write your reply to:

Draft