• Resolved antonggg

    (@antonggg)


    Hi,
    Installing the plugin seems to have improved our load times quite a bit, I guess mostly due to caching. I wanted to give Minify a try, but one image on our front page disappears when I activate Minify JavaScript, possibly also some more images, but that’s what I could see imediately. It works for html and CSS.

    I tried to further narrow it down by using the options “Enable minification of JavaScript files” and “Enable merging of JavaScript files”, but both create this problem. While having a technical background, I am not a web developer, so I am not too much familiar with those settings.

    Any idea what causes this, should I exclude a certain file or similar?

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi there,

    Could you share a screenshot of the issue VS no issue, then enable minification of JS and enable “Contain each included file in its own block” (just until I can see the issue)?

    Marc.

    Thread Starter antonggg

    (@antonggg)

    Hi Marc,

    Thanks for your fast reply. Here is the screenshot: https://drive.google.com/file/d/1vS_xFpwkcqG0jMcb0UnjKYHpkXl-y3Tq/view?usp=sharing , and I enabled Minify for JavaScript as instructed.

    Thread Starter antonggg

    (@antonggg)

    Strangely, this is only an issue on the English version, not the French site. I found some other images with the same problem, all in English only:

    – An image on https://canamasq.com/about-us/ (present in French)
    – multiple images on the product pages https://canamasq.com/shop/canamasq-reusable-facemask and https://canamasq.com/shop/childsize-canamasq-reusable-facemask (as well present in French).

    The English is the original site, French is translated with WPML.

    • This reply was modified 4 years, 6 months ago by antonggg.

    All the pages you linked work fine for me, both in English and French.

    What I noticed is that Lazy-loading is enabled on the images, so it could be related to that feature.

    On a page where the image doesn’t appear, could you open your browser’s console and check for errors? There current are several errors, but they are related to a video player which seems to be blocked. So we’re looking for something else.

    Edit: Are you logged in when seeing the issue?

    • This reply was modified 4 years, 6 months ago by Marc Lacroix.
    Thread Starter antonggg

    (@antonggg)

    Hi Marc,

    Just check: Yes, these images disappear only when logged in with Firefox, when using a different browser or a private window in Firefox to be logged out it works fine.

    Additionally, disabling lazyload (through Jetpack) makes them also visible everywhere. Since seeing the site correctly also when logged in would be important: Any fix? Or generally, would enabling minify or lazyload of images give me more performance, if I can select only one? This isn’t a crazy complex page…

    I find the following errors (here on About, but the same as well on the other pages):
    "Uncaught SyntaxError: missing } after property listwpo-minify-footer-873ccc63.min.js:108:156note: { opened at line 108, column 129"

    Thanks!

    • This reply was modified 4 years, 6 months ago by antonggg.

    Any fix? Or generally, would enabling minify or lazyload of images give me more performance, if I can select only one? This isn’t a crazy complex page…

    You should be able to use both, we just have to narrow it down to the file that causes the issue.

    The error you shared would be the one, but the file contains a too much informations for me to be sure.

    So could you disable “Enable merging of JavaScript files” for now, and check for a similar error?

    Thread Starter antonggg

    (@antonggg)

    With this option disabled, the image gets displayed.
    Error messages:

    Uncaught SyntaxError: missing } after property list
    wpo-minify-footer-googlesitekit-modules-adsense.min.js:8:156note: { opened at line 8, column 129
    wpo-minify-footer-googlesitekit-modules-adsense.min.js:8:129
    Uncaught SyntaxError: missing } after property list
    wpo-minify-footer-googlesitekit-modules-analytics.min.js:10:32604note: { opened at line 10, column 32577
    wpo-minify-footer-googlesitekit-modules-analytics.min.js:10:32577
    Uncaught SyntaxError: unexpected token: identifier
    wpo-minify-footer-googlesitekit-modules-tagmanager.min.js:2:52895
    • This reply was modified 4 years, 6 months ago by antonggg.

    Ok. You can try to add google-site-kit/dist/ to the setting “Exclude JavaScript from processing”, and try to re-enable merging of files.

    Thread Starter antonggg

    (@antonggg)

    Thanks, that worked!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Minify JavaScript removes an image’ is closed to new replies.