iron-image | Vaadin

Image element with sizing and preloading options

Published on NPM Build status Published on


iron-image is an element for displaying an image that provides useful sizing and preloading options not found on the standard <img> tag.

See: Documentation, Demo.



npm install --save @polymer/iron-image

In an HTML file

    <script type="module">
      import '@polymer/iron-image/iron-image.js';
      iron-image {
        width: 400px;
        height: 400px;
        background-color: lightgray;
    <iron-image sizing="cover" preload src=""></iron-image>

In a Polymer 3 element

import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';

import '@polymer/iron-image/iron-image.js';

class ExampleElement extends PolymerElement {
  static get template() {
    return html`
      <iron-image sizing="contain" fade src=""></iron-image>

customElements.define('example-element', ExampleElement);


If you want to send a PR to this element, here are the instructions for running the tests and demo locally:


git clone
cd iron-image
npm install
npm install -g polymer-cli

Running the demo locally

polymer serve --npm

Running the tests

polymer test --npm


Link to this version
ImportedReleased 26 April 2019BSD 3-clause "New" or "Revised" License
Framework Support
Polymer 3.0+
Also supported:
Polymer 1 (3.0.1)Polymer 2 (2.2.1)
Browser Independent
Install with
npm install @polymer/iron-image"@3.0.2"
Run the above npm command in your project folder. If you have any issues installing, please contact the author.
Release notes - Version 3.0.2


  • @polymer/polymer#^3.0.0