• Resolved Weston Ruter

    (@westonruter)


    Hello! I’m a maintainer of the official AMP plugin. I’ve received several reports about SG Optimizer breaking AMP validation. This is due to things like AMP CDN scripts being concatenated and minified like so:

    <script src="https://example.com/wp-content/uploads/siteground-optimizer-assets/siteground-optimizer-combined-js-676828fd0b675433ed1ac049b13c3818.js"></script>

    When they need to be left as-is, for example:

    <script async src="https://cdn.ampproject.org/v0.js"></script>
    <script src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js" async custom-element="amp-analytics"></script>

    Can the optimizations that break AMP compatibility be exempted when AMP pages are being served? There is the is_amp_endpoint() function which can be used to detect whether the page is AMP (note it must be called at or after the wp action). The AMP plugin also includes many optimizations built-in, so it may not be relevant for SG Optimizer to do anything on AMP pages.

    • This topic was modified 4 years, 11 months ago by Weston Ruter.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Can you update to 5.5.1 and check if it’s working as expected please?

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Closing this due to no replies.

    Thread Starter Weston Ruter

    (@westonruter)

    I don’t have a site on SiteGround to test this. I’m relaying reports from users of the AMP plugin. If someone has an issue in the future I’ll direct them to open an issue in the support forum here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SG Optimizer breaks AMP validity’ is closed to new replies.