Image Decode API (img.decode())

This change allows web developers to request to decode an img element. The call to a new HTML <img> element’s decode() function returns a promise, which, when fulfilled, ensures that the image can be appended to the DOM without causing a decoding delay on the next frame. Sample code: var img = new Image(); img.src = "nebula.jpg"; img.decode().then(function() { document.getElementById("container").appendChild(img); });

Documentation

Status in Chromium

Proposed (launch bug)

Consensus & Standardization

  • No public signals
  • No public signals
  • Public support
  • No signals

Owners

Last updated on 2017-03-27