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 };