From 4f0771a1c2ad629c3943de8f0d342f919f94d835 Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Fri, 19 Apr 2024 13:22:04 -0400 Subject: [PATCH] fix: properly replace media path with public path --- packages/core/src/lib/util/media.util.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/lib/util/media.util.ts b/packages/core/src/lib/util/media.util.ts index 99e2ac65..a8411037 100644 --- a/packages/core/src/lib/util/media.util.ts +++ b/packages/core/src/lib/util/media.util.ts @@ -306,6 +306,8 @@ export function selectMediaFilePublicPath( if (mediaPath.startsWith(mediaFolder)) { return mediaPath.replace(mediaFolder, publicFolder); + } else if (mediaPath.startsWith(trim(mediaFolder, '/'))) { + return mediaPath.replace(trim(mediaFolder, '/'), publicFolder); } return mediaPath;