diff --git a/src/js/slide/content.js b/src/js/slide/content.js index b6b7152b2..c7468c316 100644 --- a/src/js/slide/content.js +++ b/src/js/slide/content.js @@ -417,7 +417,7 @@ class Content { // purposefully using finally instead of then, // as if srcset sizes changes dynamically - it may cause decode error /** @type {HTMLImageElement} */ - (this.element).decode().finally(() => { + (this.element).decode().catch(() => {}).finally(() => { this.isDecoding = false; this.appendImage(); }); diff --git a/src/js/util/util.js b/src/js/util/util.js index 4c71613a0..197b437e0 100644 --- a/src/js/util/util.js +++ b/src/js/util/util.js @@ -154,7 +154,7 @@ export function removeTransitionStyle(el) { */ export function decodeImage(img) { if ('decode' in img) { - return img.decode(); + return img.decode().catch(() => {}); } if (img.complete) {