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(