<image>
Displays a PNG, JPEG, WebP, GIF or BMP image, like an <img>. It loads bundled assets, remote URLs and base64 data URIs.
Usage
Import LYNX_ELEMENTS in your component (see Elements).
Give every <image> a width and height, or auto-size. Unlike <img>, it has no size of its own, and Lynx doesn't load an image whose box is 0×0. An <img> in a template renders as an <image auto-size>.
On an Android phone with 16 KB memory pages:
- a GIF or animated WebP shows its first frame, and sends no
bindstartplayor loop events blur-radiusends the app
Lynx's image service is built against Fresco 2.3, whose native libraries for those don't load with 16 KB pages. Phones with 4 KB pages, almost all of them today, animate and blur as usual.
Attributes
Plus the common attributes, such as id, class and style.
Events
Read the payload from $event.detail. Angular types $event for each event: see Element events.
Plus the common events, such as bindtap.
Methods
These UI methods (Glossary) control animated images on iOS and Android. Call them with invoke() on the element (see Call element methods).
Related
<svg>: vector images- CSS on Lynx: sizing, borders and
background-image - Call element methods
