[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ru/docs/Web/API/HTMLImageElement/decoding [Back]  [Original]

HTMLImageElement.decoding - API | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

HTMLImageElement.decoding

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2020 ..

decoding HTMLImageElement , .

In this article

, . :

"sync"

.

"async"

.

"auto"

. , . , -:

  • Chromium "sync".
  • Firefox "async".
  • Safari "sync" .

js
var img = new Image();
img.decoding = "sync";
img.src = "img/logo.png";

Specification
HTML
# dom-img-decoding


Web Proxy Viewer  |  New URL  |  Original Page