How to insert Amazon iframe on posts

Hello, considering that onebox seems not to work properly with amazon other than .com (since 2019, info), I would like to try using iframes.

The code to insert is:
<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//"></iframe>

I entered the following addresses in the option allowed iframes

But I don’t see the banner, where am I wrong?
Obviously there are no active adblocks.

You could try just entering // into the allowed iframes site setting. I think that will display an iframe, but it might not look very good. If you try this, you’ll need to rebuild the HTML for any existing posts that you’ve added the iframe to.


You don’t need an iframe. You can use their snippets directly.

Btw Oneboxing would break your affiliate agreement as they would not be happy with the use of their logo in that way. They once closed my account for that transgression.

1 Like

Thanks Simon, with // the iframes are seen but like this
Immagine 2021-04-24 103013

Only with you can also create links to images :frowning_face:

Text + Image create only an iframe… for this I was hoping that onebox would work with Amazon other than .com but maybe this is not a priority for developers.


Yep that’s true, only works with image snippets, text+image renders an iframe.

I think this is just a trivial CSS issue, try:

.topic-post iframe {
    height: 240px;

Adjust as you see fit.

NB Bear in mind that will affect all iframes in posts.

You could get more specific using the data-post-id, data-topic-id or even the data-user-id


Thanks @merefield, forum users don’t like this solution very much but I don’t have other alternatives.

I use image snippets inside a Markdown table. Allows me to add affiliate disclaimer above the link. Lack of a disclaimer is likely to incur Amazon wrath too :grimacing:

1 Like

Great idea!
Can you give me an markdown table example?

Sure, something like:

<sup>*(NB from admin: As an Amazon Associate I earn from qualifying purchases.  Thanks for your support!)*

|Albott Pro Stunt Scooter|

One of the advantages of this approach btw, is Discourse keeps a counter by the image for the number of times it’s been clicked :slight_smile: :rocket:


It’s perfect, thank you! :grinning:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.