Skip to content

Commit 178a7fb

Browse files
committed
fix: use absolute paths for blog thumbnail images
The image src paths were relative (blog/...) which caused them to resolve incorrectly when on the /blog/ page (becoming /blog/blog/...). Changed to absolute paths (/blog/...) to match blog-tag-route.tsx.
1 parent 6a44214 commit 178a7fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routes/blog-index-route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function blogIndexRoute() {
3030
<img
3131
class="flex-shrink-0 mr-8 rounded-lg w-[100%] max-w-[500px] h-auto"
3232
src={latest.image
33-
? `blog/${latest.id}/${latest.image}`
33+
? `/blog/${latest.id}/${latest.image}`
3434
: "/assets/fs-logo-no-text.svg"}
3535
alt="blog image"
3636
/>
@@ -61,7 +61,7 @@ export function blogIndexRoute() {
6161
<img
6262
class="box-content flex-shrink-0 rounded-lg w-full h-[250px] overflow-clip object-contain"
6363
src={post.image
64-
? `blog/${post.id}/${post.image}`
64+
? `/blog/${post.id}/${post.image}`
6565
: "/assets/fs-logo-no-text.svg"}
6666
alt="blog image"
6767
/>

0 commit comments

Comments
 (0)