Start decoding images immediately

This commit is contained in:
SelfishPig 2025-12-17 14:34:39 -06:00
parent 62252f7216
commit dc2389cdf4

View file

@ -12,6 +12,7 @@ export function allImagesLoaded(): Promise<void[]> {
function imageLoaded(img: HTMLImageElement): Promise<void> { function imageLoaded(img: HTMLImageElement): Promise<void> {
if (!img.getAttribute("decoding")) { if (!img.getAttribute("decoding")) {
img.decoding = "async"; img.decoding = "async";
img.decode();
} }
return img.complete return img.complete
? Promise.resolve() ? Promise.resolve()