Support » Plugin: Autoptimize » Can’t Activate Aggregate JS-files? or else my images…

  • Resolved lucascuello

    (@lucascuello)


    Hi guys,

    I’ve always had a great experience with Autoptimize, and I also use the ExtraCSS option. But since a couple days ago, the images from my Woocommerce products look empty on all browsers.

    I found that deactivating Aggregate JS-files? made the images show again. I wonder what the problem is? I didn’t add any new plugins. The theme I use is Divi.

    Any clues?

    Thanks for your time.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Sounds like there’s a problem with image lazyloading, what JS-errors appear on the browser console when “aggregate JS” is active?

    dmatamales

    (@dmatamales)

    I (seemingly) randomly just recently started having a problem with Autoptimize’s Aggregate JS-files setting on one of my sites as well. Most JS on my site suddenly broke with errors that seemed to indicate that some WP core JS wasn’t loading soon enough (_ is undefined, wp is undefined, etc.).

    I think it may have been due to the changes in scripts included with WordPress 5 but it’s also likely that it was really caused by a change another plugin made as a response to these changes in WP 5 because the issue started happening a few days ago.

    After an hour or two of poking around, untying knots, and trying to figure out what was at fault, my fix was eventually adding wp-includes/js/dist to the Exclude scripts from Autoptimize list. Unfortunately this adds about 30 JS files unaggregated to most pages of the site (in my configuration). A bit drastic, but still better than no aggregation at all I guess.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ah, you’ve fallen victim of a plugin that is very likely doing Gutenburg wrong, inadvertently enqueueing a huge amount of JS-files even if that should not be needed (underscore, wp object JS, …). try finding out which plugin is doing so and urge them to fix that 🙂

    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    update re. doing Gutenberg wrong:
    * more info in this blogpost
    * you can fix by adding wp-includes/js/dist to the comma-separated JS optimization exclusion list
    * the exclusion will be part of the default settings in the upcoming AO 25

    frank

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t Activate Aggregate JS-files? or else my images…’ is closed to new replies.