Do you build things with AMP? Fill out the AMP Developer Survey!

Important: this documentation is not applicable to your currently selected format email!



Displays a Gfycat video GIF.

Required Scripts

<script async custom-element="amp-gfycat" src=""></script>


The width and height attributes determine the aspect ratio of the Gfycat embedded in responsive layouts.




The Gfycat ID found in any Gfycat url. For example, TautWhoppingCougar is the id in the following url:

width and height

The width and height attributes are special for the Gfycat embed. These should be the actual width and height of the Gfycat. The system automatically adds space for the "chrome" that Gfycat adds around the GIF.

Gfycat allows many aspect ratios.

To specify the width and height in the code, copy it from the embed URL:

  1. Go to, where name is the Gfycat ID.
  2. Click the embed link icon (</>).
  3. Copy the width and height specified in the "Fixed iFRAME" field.


By default, a video autoplays.

  • when the video is scrolled out of view, the video is paused
  • when the video is scrolled into view, the video resumes playback
  • if the user has interacted with the video (e.g., pauses/resumes), and the video is scrolled in or out of view, the state of the video remains as how the user left it. For example, if the user pauses the video, then scrolls the video out of view and returns to the video, the video is still paused.

You can turn off autoplay by setting the noautoplay attribute.

<amp-gfycat data-gfyid="TautWhoppingCougar" width="640" height="360" noautoplay>

Common attributes

This element includes common attributes extended to AMP components.


See amp-gfycat rules in the AMP validator specification.

Need more help?

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