AMP

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

amp-imgur

Description

Displays an Imgur post.

 

Required Scripts

<script async custom-element="amp-imgur" src="https://cdn.ampproject.org/v0/amp-imgur-0.1.js"></script>

Usage

This extension creates an iframe and displays an imgur post.

<amp-imgur
  data-imgur-id="f462IUj"
  layout="responsive"
  width="540"
  height="663"
></amp-imgur>

Attributes

data-imgur-id (required)

The id of the Imgur post.

Album ids should prefixed with a/ like a/ZF7NS3V.

You can confirm this in the post's url. It should include a/ before the rest of the id, like on: https://imgur.com/a/ZF7NS3V

width (required)

The width of the Imgur post.

height (required)

The height of the Imgur post.

Common attributes

This element includes common attributes extended to AMP components.

Validation

See amp-imgur rules in the AMP validator specification.

Perlu bantuan lainnya?

Anda telah membaca dokumen ini belasan kali, tetapi belum semua pertanyaan Anda terjawab? Mungkin orang lain merasakan hal yang sama. Berinteraksilah dengan mereka di Stack Overflow.

Kunjungi Stack Overflow
Menemukan bug atau ada fitur yang kurang?

Proyek AMP sangat menganjurkan partisipasi dan kontribusi Anda! Kami berharap Anda akan terus ambil bagian dalam komunitas sumber terbuka kami, tetapi kami juga menerima kontribusi satu kali untuk topik tertentu yang Anda minati.

Kunjungi GitHub