Copied to clipboard

Flag this post as spam?

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


  • ds 191 posts 223 karma points
    Jun 14, 2012 @ 14:41
    ds
    0

    Unable to see thumbnail images at first!

    I using ImageGen Basic version 2.5.7.27945 and installed and configured it. I come across with a problem and I could find a solution in the forum.

    I am using thumbnails on gallery page. When I hit the gallery page first time, the only thing I could see is little dots.

    If I refresh or hit the page again this time thumbnails are shown as they are expected.

    Is this a bug or Am I missing somthing?

     

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Jun 18, 2012 @ 17:18
    Douglas Robar
    0

    Very odd.

    Can you use firebug or fiddler or your browser's "inspector" mode to see what is being returned by the initial requests? That would be helpful.

    cheers,
    doug. 

  • ds 191 posts 223 karma points
    Jun 19, 2012 @ 09:51
    ds
    0

    This is what I get after right clicking and selecting "inspect element with firebug"

    <div class="wrapper indent-top6-1 indent-bottom10">
    <ul id="myGallery" class="image-overlay">
    <li>
    <a href="/galeri/dueuen.aspx" style="width: 173px; height: 173px; border-color: rgb(102, 102, 102);">
    </li>
    <li>
    <a href="/galeri/genel.aspx" style="width: 173px; height: 173px; border-color: rgb(102, 102, 102);">
    </li>
    <li>
    <a href="/galeri/sergi-etkinlikler.aspx" style="width: 173px; height: 173px; border-color: rgb(102, 102, 102);">
    </li>
    <li>
    <a href="/galeri/ylba.aspx" style="width: 173px; height: 173px; border-color: rgb(102, 102, 102);">
    </li>
    <li>
    <a href="/galeri/sirtaki.aspx" style="width: 173px; height: 173px; border-color: rgb(102, 102, 102);">
    </li>
    </ul>
    <p style="clear: both; height: 0px;">&nbsp;</p>
    <script charset="utf-8" type="text/javascript">
    $(document).ready(function(){
    $('#myGallery').ImageOverlay()
    });
    </script>
    </div>
  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Jun 19, 2012 @ 10:01
    Douglas Robar
    0

    That wasn't exactly what I meant but that's still helpful -- no <img> tags at all. Which makes me think it isn't ImageGen per se.

    I was thinking more about the output on the 'net' tab to see if any requests were being made to ImageGen and, if so, the return value (200, 304, 404, etc.). If you can get that info that would be helpful.

    But perhaps if it's not ImageGen causing the issue then if you could show the xslt or razor code you're using to generate the <ul id="myGallery"> markup there might be something obvious there. 

    cheers,
    doug. 

  • ds 191 posts 223 karma points
    Jun 19, 2012 @ 10:11
    ds
    0

    To clarify things better and go faster this is the link of the gallery page

    I am not so familiar with firebug but I get 304 Not Modified warning.

    Here is also razor code which displays gallery thumbnails.

    <ul id="myGallery" class="image-overlay">
        @{
            foreach (var gallery in Model.Children)
            {
               
                if (gallery.HasValue("photos"))
                {
                    var MediaGalleryFolder = Library.MediaById(gallery.photos);
                    var noPhotos = MediaGalleryFolder.Children.Count();

                    //Get the first image in the folder
                    var imageNode = MediaGalleryFolder.Children.First();
                    var imageURL = imageNode.umbracoFile;               
            
                    <li>
                        <a href="@gallery.Url">
                            <!-- Use ImageGen querystring to automatically generate a thumbnail & setup fallback image -->
                            <img src="/ImageGen.ashx?image=@imageURL&height=173&width=173&crop=resize&align=center&altImage=/img/no-image.png" alt="@gallery.Name"/>
                            <div class="caption">
                                <h4>@gallery.Name</h4>
                                <p>@noPhotos resim<p>                       
                            </div>                            
                        </a>
                    </li>            
                }
            }
        }
    </ul>
  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Jun 19, 2012 @ 10:39
    Douglas Robar
    0

    Ahhh, the link to the page is just what's needed, thank you!

    The razor code looks good, and the images are properly loaded even on the first request.

    The problem is with some javascript that is forcing the <a> to width=0 and height=0. The images are there but they can't be seen because the anchor containing the image has no size. Once you correct the javascript issue all should be fine. 

    cheers,
    doug. 

  • ds 191 posts 223 karma points
    Jun 19, 2012 @ 13:00
    ds
    0

    OK, I will check your suggestion :) Thanks for the help, Doug

Please Sign in or register to post replies

Write your reply to:

Draft