Copied to clipboard

Flag this post as spam?

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


  • Jack Lawry 16 posts 137 karma points c-trib
    Nov 10, 2017 @ 13:34
    Jack Lawry
    0

    Slimsy issue when browser is made smaller then bigger

    I have an issue with Slimsy where it is working but only if I make the page smaller or refresh once I make it larger again?

    I have a page with a large 1600px wide image so if I start with my browser window at 1800px wide (the image sits nicely centred with 100px either side)

    I then shrink the browser window down to 400px wide again it all works nicely and I can see in the inspector the other versions of that image all loading as expected although possible not needed as the larger image would already be cached by the browser (I am also using the bootstrap class “img-responsive” to scale it down).

    However, as soon as I make the browser window larger again back to say 1000px the image remains at the smaller (480px wide) size until I refresh the browser.

    Am I missing something?

  • Jeavon Leopold 2997 posts 13132 karma points MVP 6x admin c-trib
    Nov 10, 2017 @ 13:36
    Jeavon Leopold
    0

    Hi Jack, are you using v1 or v2?

  • Jack Lawry 16 posts 137 karma points c-trib
    Nov 10, 2017 @ 13:38
    Jack Lawry
    0

    Thanks for the fast reply - I am using the latest version "2.0.0-beta2"

  • Jeavon Leopold 2997 posts 13132 karma points MVP 6x admin c-trib
    Nov 10, 2017 @ 13:57
    Jeavon Leopold
    0

    Cool, can you check that all the images have display:block style applied to them?

  • Jack Lawry 16 posts 137 karma points c-trib
    Nov 10, 2017 @ 14:15
    Jack Lawry
    100

    Hi Jeavon,

    Yes they did however looking at the CSS again has helped me find the issue.

    I was using the bootstrap class of "img-responsive" this width was causing the issue.

    To fix I have added this bit of CSS and it seems to be working now:

    img{
        &.lazyautosizes{
            display: block;
            &.img-responsive{
                width: 100%;
            }
        }
    }
    

    Thanks for your time!

  • Jeavon Leopold 2997 posts 13132 karma points MVP 6x admin c-trib
    Nov 10, 2017 @ 14:16
    Jeavon Leopold
    0

    Great!

Please Sign in or register to post replies

Write your reply to:

Draft