From e5e68b57ba5417354370db8ef88f0ede6b25b502 Mon Sep 17 00:00:00 2001 From: Sebin Nyshkim Date: Sat, 26 Apr 2025 21:39:06 +0200 Subject: [PATCH] fix: :bug: filter processing of images served from a certain url --- eleventy.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eleventy.config.js b/eleventy.config.js index f05c8e3..8db6560 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -29,7 +29,10 @@ const urlFormat = ({ src, width, format }) => { const imgUuid = src.match(/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/); const imgFormat = format === 'jpeg' ? 'jpg' : format; - return `${baseUrl}/${imgUuid[1]}.${imgFormat}?width=${width}`; + if (src.startsWith(baseUrl)) + return `${baseUrl}/${imgUuid[1]}.${imgFormat}?width=${width}`; + + return src; }; const MARKDOWNIT_OPTIONS = { html: true, linkify: true, typographer: true };