# Discourse Comment Embed to Support Google AMP?

**URL:** <https://meta.discourse.org/t/discourse-comment-embed-to-support-google-amp/64721>\
**Category:** Feature\
**Created:** [18 Junio, 2017 23:47 UTC](https://meta.discourse.org/t/discourse-comment-embed-to-support-google-amp/64721 "2017-06-18T23:47:13Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![Winsomniak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/winsomniak/32/74182_2.png) [@Winsomniak](https://meta.discourse.org/u/Winsomniak)\
**Post date:** [19 Junio, 2017 04:10 UTC](https://meta.discourse.org/t/discourse-comment-embed-to-support-google-amp/64721/17 "2017-06-19T04:10:27Z")

</div>

I’m not using Wordpress for this but I did look over that plugin for ideas. Cool that you got it working on your site @simon !

@sam I just got the embed working by bypassing the javascripts/embed.js logic completely. I still need to handle the iframe sizing issue but all of the functionality seems to be good. Basically I used the output from javascripts/embed.js with some additional sandbox settings.

```
<iframe id="discourse-embed-frame"
        height="200"
        width="300"
        src="discourseurl.tld/embed/comments?embed_url={{canonical}}&discourse_username={{username}}"
        frameborder="0"
        sandbox="allow-scripts allow-same-origin allow-popups"
        scrolling="no"
        layout="responsive">
</iframe>

```

I just swap this out with amp-iframe for amp pages.

The main question in my mind is “Should I be doing this?” Looking over javascripts/embed.js again, I am mostly missing out on the iframe sizing and url normalization, but if that script changes I’ll be none the wiser.

---

_[View the full topic](https://meta.discourse.org/t/discourse-comment-embed-to-support-google-amp/64721)._
