From f43ffcc729480acd39ead269540a43be37bbde83 Mon Sep 17 00:00:00 2001 From: Si Jobling Date: Sat, 3 Jan 2026 12:04:51 +0000 Subject: [PATCH] Skip unsupported HEIF images in img processing --- _11ty/img-dim.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_11ty/img-dim.js b/_11ty/img-dim.js index c3312b5..ca49ca7 100644 --- a/_11ty/img-dim.js +++ b/_11ty/img-dim.js @@ -59,10 +59,14 @@ const processImage = async (img, outputPath) => { img.setAttribute("width", dimensions.width); img.setAttribute("height", dimensions.height); } - const inputType = dimensions.type; + const inputType = (dimensions.type || "").toLowerCase(); if (inputType == "svg") { return; } + if (inputType == "heif" || inputType == "heic") { + console.warn(`Skipping unsupported image type "${inputType}"`, src); + return; + } if (inputType == "gif") { const videoSrc = await gif2mp4(src); const video = img.ownerDocument.createElement(