AmpImage

AmpImage class

The AmpImage type exposes the following members:

Constructors

NameDescription
AmpImage(width, height)Initializes a new instance of the AmpImage class

Properties

NameDescription
required_scriptRequired script that muct be added to head section.
attributesAMP provides a set of common attributes that are extended to many AMP components.
fallbackA fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
placeholderThe element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.
srcSimilar to the src attribute on the img tag. The value must be a URL that points to a publicly-cacheable image file
altA string of alternate text, similar to the alt attribute on img.
is_validIndicates whether this image is valid of AmpImage.

Methods

NameDescription
to_amp_html()
to_html()

See Also