• Resolved Matic Broz

    (@otterreviews)


    Hi,

    I am using theme Schema and plug-ins W3 Total Cache with AMP and CloudFlare activated.
    When I have General Settings > Minify > Enabled, google’s AMP – URL inspector warns:

    Linked AMP version is invalid > Disallowed attribute or attribute value present in HTML tag > The attribute ‘src’ in tag ‘IMG-I-AMPHTML-INTRINSIC-SIZER’ is set to the invalid value ‘data:image/svg+xml;charset=utf-8,<svg height=”338″ width=”651″ xmlns=”https://www.w3.org/2000/svg&#8221; version=”1.1″>’.

    I also tried the same with:
    https://validator.ampproject.org/#url=https%3A%2F%2Fwww.otterreviews.com%2Fluminar-vs-lightroom%2Famp

    This happens for all my posts.

    Disabling Minify makes AMP- URL inspector work again, but then my page loads slowly due to unminified css and js.

    I tried: disabling and enabling both extensions, playing around with settings, purging caches, etc.

    Any ideas?

    • This topic was modified 4 years, 11 months ago by Matic Broz.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @otterreviews

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    You stated that you are using W3 Total Cache and Cloudflare. Is minify enabled in both W3TC and Cloudflare?
    Also, have you enabled the AMP extension in Performance>Extensions?
    Thank you!

    Thread Starter Matic Broz

    (@otterreviews)

    Yes, I do. Which I know can be a problem, but with only CloudFlare’s minify enable I am getting horrible speed insight results, warning me that 10+ of my css and js is not minified.
    It seems like CloudFlare is not doing its job, where I have two Page Rules:
    – Cache Level: Cache Everything
    – Edge Cache TTL: a month

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @otterreviews

    Yes, it can be a problem. It is not recommended to use more than one minify solution. And have you tried disabling Cloudflare minify, Leave W3 Total Cache minify enabled and enable the AMP Extension?
    Thank you!

    Thread Starter Matic Broz

    (@otterreviews)

    With Minify disabled in W3, and enabled in ClouFlare, as well as AMP being enabled, I get a pass from AMP Validator, but now my PageSpeed Insights is horrible.
    …block-library/style.min.css(www.otterreviews.com)
    …block-library/theme.min.css(www.otterreviews.com)
    …css/twenty20.css(www.otterreviews.com)
    …icomoon/style.min.css(www.otterreviews.com)
    …css/screen.min.css(www.otterreviews.com)
    …css/wp-review.css(www.otterreviews.com)
    …mts_schema/style.css(www.otterreviews.com)
    …css/responsive.css(www.otterreviews.com)
    …css/magnific-popup.css(www.otterreviews.com)
    …css/font-awesome.min.css(www.otterreviews.com)
    …jquery/jquery.js(www.otterreviews.com)
    …jquery/jquery-migrate.min.js(www.otterreviews.com)
    /css?family=…(fonts.googleapis.com)

    These add up to 1.8 – 2.8 seconds on start up.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @otterreviews

    Thank you for the information.
    And what if you disable Cloudflare minify, and enable W3 Total Cache to minify like asked in the previous post?
    Thanks!

    Thread Starter Matic Broz

    (@otterreviews)

    I tried this already, but I still get AMP error. It looks like CloudFlare doesn’t do its job, and W3 Total Cache does too much.

    • This reply was modified 4 years, 11 months ago by Matic Broz.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @otterreviews

    Can you please re-enable W3 Total Cache minify, and disable HTML minify in the minify settings?
    See if that helps.
    Thank you!

    Thread Starter Matic Broz

    (@otterreviews)

    This seems to have done the trick!
    I still have some unused CSS to minify, but that’s the least of my problems right now.

    Thank you for your help!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @otterreviews

    Thank you for the information.
    Glad to know the issue is resolved.
    Thank you!

    For anyone driving by, we solved this simply went to Dashboard > Performance > Minify > Advanced > Never minify the following pages and put /amp/ in there. That seems to have done it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Invalid AMP with Minify enabled’ is closed to new replies.