Important: this documentation is not applicable to your currently selected format stories!
Displays an Instagram embed.
<script async custom-element="amp-instagram" src="https://cdn.ampproject.org/v0/amp-instagram-0.1.js"></script>
height attributes are special for the Instagram embed.
These should be the actual width and height of the Instagram image.
The system automatically adds space for the "chrome" that Instagram adds around the image.
Many Instagrams are square. When you set
layout="responsive" any value where
height are the same will work.
<amp-instagram data-shortcode="fBwFP" data-captioned width="400" height="400" layout="responsive" > </amp-instagram>
If the Instagram is not square you will need to enter the actual dimensions of the image.
When using non-responsive layout you will need to account for the extra space added for the "instagram chrome" around the image. This is currently 48px above and below the image and 8px on the sides.
|data-shortcode||The instagram data-shortcode is found in every instagram photo URL.
For example, in https://instagram.com/p/fBwFP,
|data-captioned||Include the Instagram caption. |
|common attributes||This element includes common attributes extended to AMP components.|
See amp-instagram rules in the AMP validator specification.
You've read this document a dozen times but it doesn't really cover all of your questions? Maybe other people felt the same: reach out to them on Stack Overflow.Go to Stack Overflow Found a bug or missing a feature?
The AMP project strongly encourages your participation and contributions! We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about.Go to GitHub