• Hello,

    I’ve noticed that AMP pages don’t have minified code? I’m using the Autoptimize (http://blog.futtta.be/autoptimize/) plugin.

    When viewing non-AMP pages all code output is optimized/minified appropriately but with AMP turned on everything is un-minified and parsed out as if out of the box WordPress.

    Thought?

Viewing 7 replies - 1 through 7 (of 7 total)
  • autoptimize explicitely bails out of optimization for amp-pages, as this breaks the amp-validation screenmachine.

    hope this clarifies,
    frank (ao dev)

    Thread Starter screenmachine

    (@screenmachine)

    I gotcha, at least it wasn’t something I missed then. Thank you.

    Thread Starter screenmachine

    (@screenmachine)

    Is there any recommended method to at least minify AMP’d pages output?

    had a look at the source code of http://ampforwp.com/demo/?amp, seems like the inline CSS is already minified. some HTML minification could be done (removing of linebreaks and tabs mostly), maybe something the plugin devs could add (although the performance-gain would be minimal)?

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    @screenmachine
    Thank you so much for using the plugin. We don’t have any option to minify the CSS, but as @futtta has mentioned, it would be a very minimal gain in performance.

    Hey Frank, @futtta Thank you so much for giving your time to help our user here on the thread. I really appreciate it! The reason it is minifying our output is because we have Google pagespeed mod on the server side.

    I hope it helps,

    Regards,
    Ahmed

    stanisamj

    (@stanisamj)

    Dear Ahmed Kaludi,
    I have used amp plugin in my website https://www.safari-sahara.com/. Content only fetch and display the page. But css and images are not loading.
    My questions,
    How to add the CSS files in amp?
    How to call the IMAGES?

    Am waiting your comments.
    Thanks,
    Stanislas.

    • This reply was modified 9 years ago by stanisamj.
    Plugin Contributor ampforwp

    (@ampforwp)

    Hey @stanisam,

    I apologize for the delay in response.

    What css files you want to add in AMP?

    Regards
    Marqas

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Code minification not working with AMP on’ is closed to new replies.