Copied to clipboard

Flag this post as spam?

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


  • daniel 13 posts 83 karma points
    Jun 21, 2017 @ 16:11
    daniel
    0

    Images not showing in chrome, string is appended at the end of file for some reason

    I'm having an issue with images not showing in Chrome but showing just fine in internet explorer. Once I bring up developer tools and do an inspect, the src for the image appears like

    /media/9494/col_116588_121916_1200x628-1.png
    

    in Internet Explorer. However in Chrome, this string gets appended to the end of the document and the image doesn't load.

    /media/9494/col_116588_121916_1200x628-1.png?1498061289003
    

    If i remove the appended string, the image loads. However this string gets added in each time the page is reloaded.

    Here is what my code looks like where i the image is

       var image = 
       Umbraco.Content(node.Id).GetPropertyValue("postImage").src;
    
        <div class="column">
        <img class="post-image" src="@image">
    

    any idea what could be causing this string to be appended in Chrome only and prevent the image from loading?

    Thanks,

  • John Bergman 483 posts 1132 karma points
    Jun 21, 2017 @ 17:10
    John Bergman
    0

    Typically, the string is a hash or something of the image to help prevent caching of images when they change (so you always get the correct image). This is probably the case here as well.

  • daniel 13 posts 83 karma points
    Jun 21, 2017 @ 17:16
    daniel
    0

    Is there a fix for this? I just took a look at the string being passed and it does not include that appended string that appears in Chrome. It appears as though this issue does not occur in Firefox nor IE. It also doesn't occur for any other images I have being displayed.

    thanks

Please Sign in or register to post replies

Write your reply to:

Draft