From 6e3484411495987a1a78c55c714a45e921dda372 Mon Sep 17 00:00:00 2001
From: Mats Fangohr <83273529+MatsFangohr@users.noreply.github.com>
Date: Tue, 02 Jan 2024 16:03:05 +0000
Subject: [PATCH] feat: embed webp images (#666)
---
quartz/plugins/transformers/ofm.ts | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index 5aa09c5..8502440 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -201,7 +201,7 @@
if (value.startsWith("!")) {
const ext: string = path.extname(fp).toLowerCase()
const url = slugifyFilePath(fp as FilePath)
- if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].includes(ext)) {
+ if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg", ".webp"].includes(ext)) {
const dims = alias ?? ""
let [width, height] = dims.split("x", 2)
width ||= "auto"
--
Gitblit v1.10.0