fix: 🐛 filter processing of images served from a certain url

This commit is contained in:
Sebin Nyshkim 2025-04-26 21:39:06 +02:00
parent fa0be3f522
commit e5e68b57ba

View file

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