Skip to content

Commit 5d8246a

Browse files
committed
Correct reltive paths to discovered images
1 parent cc17f6e commit 5d8246a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/project/types/website/listing/website-listing-read.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,10 @@ export function completeListingItems(
358358
});
359359

360360
if (contents.previewImage) {
361-
const imagePath = pathWithForwardSlashes(
362-
listingItemHref(
363-
contents.previewImage.src,
364-
dirname(docRelativePath),
365-
),
366-
);
361+
const imagePath = isAbsolute(contents.previewImage.src)
362+
? contents.previewImage.src
363+
: join(dirname(docRelativePath), contents.previewImage.src);
364+
367365
const imgHtml = imageSrc(
368366
{ ...contents.previewImage, src: imagePath },
369367
progressive,

0 commit comments

Comments
 (0)