Skip to content

Commit 357d1a5

Browse files
authored
Merge pull request #59 from nucliweb/fix/svg-false-positive-modern-format
Fix false positive 'No modern format' warning for SVG images
2 parents ff539d0 + 4ecc390 commit 357d1a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pages/Media/Image-Element-Audit.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ For maximum format coverage, wrap images in a `<picture>` element:
237237
if (!hasDimensions)
238238
issues.push({ s: "warning", msg: "Missing width/height attributes (CLS risk)" });
239239

240-
if (!isModernFormat(format) && !inPicture)
240+
if (!isModernFormat(format) && !inPicture && format !== "svg")
241241
issues.push({ s: "info", msg: "No modern format detected (WebP / AVIF / JXL)" });
242242

243243
return {

0 commit comments

Comments
 (0)