fix: 🐛 filter processing of images served from a certain url
This commit is contained in:
parent
fa0be3f522
commit
e5e68b57ba
1 changed files with 4 additions and 1 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue