• Resolved grw1

    (@grw1)


    Hello!
    I’ve been using your plugin for weeks now and haven’t had any trouble untill today. For some reason it only shows half of the image when viewed in Firefox – if I press f12 for the developer menu it shows the whole picture. Seems like the resizing of the browser triggers something for the pictures to resize and show the whole thing.
    I’m using Autoptimize and I’m currently excluding these files:

    wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, wp-includes/js/jquery/jquery-migrate.min.js

    If I disable Autoptimize the problem is gone, but this is not something I’m interested in.
    No problem in Edge or Chrome.

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Craig at Smash Balloon

    (@craig-at-smash-balloon)

    Hey grw1,

    I think we can workaround this with a bit of JavaScript that triggers the window resize event after a slight delay. Try adding this to the “Custom JavaScript” area:

    setTimeout(function() {
        var resizeEvent = window.document.createEvent('UIEvents');
        resizeEvent.initUIEvent('resize', true, false, window, 0);
        window.dispatchEvent(resizeEvent);
    },300);

    You can experiment by raising the “300” if it doesn’t seem to work at first.

    – Craig

    Thread Starter grw1

    (@grw1)

    Hello Craig,
    I’ve tried your solution without any luck. Increasing the value doesn’t seem do fix the issue.

    Plugin Author Craig at Smash Balloon

    (@craig-at-smash-balloon)

    The other thing I’m noticing is that deferring and loading jQuery asynchronously seems to be causing issues. Sometimes your images don’t load when I visit your site. Can you try disabling whatever optimization loads JS “async”? It may cause a slight performance hit but I think it’s causing problems in general for your page as far as I can tell.

    – Craig

    Thread Starter grw1

    (@grw1)

    Hello again, Craig!

    I disabled the JS async option and it now works as it should – thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Only showing half of the image in Firefox’ is closed to new replies.