decode

inline suspend fun HTMLImageElement.decode()(source)

The decode() method of the HTMLImageElement interface returns a Promise that resolves once the image is decoded and is safe to be appended to the DOM.

MDN Reference