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 it is safe to append it to the DOM.

MDN Reference