Closed prakash1763 closed 2 months ago
Thanks for the positive comment, I'll look at adding og meta tags to other pages and have commit done asap
@prakash1763 sorry this has taken so long, just to let you know that you can pass an open graph image to the base template via an image attribute on your page template <Base image="/path/to/image">
, hope that helps
Thank you!
Sorry sir, why I can't use local image in MDX? Only image from external link is accepted
// src/content/posts/post-1.mdx
---
title: 'I am the title'
description: 'Some description.'
pubDate: 2024-06-28
image: '/assets/example.jpg'
category: 'Astro'
tags: ['html', 'framework']
featured: true
---
## Some text here
The image is located in public/assets
folder, I also tried to put the image to src/assets
but still got the same error
Cause:
{
"code": "ERR_INVALID_URL",
"input": "/assets/example.jpg"
}
@prakash1763 is the image in the public folder, that could be why it can't find it
Yes it is in the public folder also in src, still not working
Hmm, that's odd, I'll look into why it can't find local images
Hey @prakash1763, have you resolved the issue with using local images? I'm also having trouble using a local image in MDX. I saved the image file in src/assets
.
---
title: 'Things you should not do in France'
description: 'When I came to France I discovered that things were quite different here when it comes to social cues than in my home country. '
pubDate: 2024-09-21
image: ../../assets/the-eiffel-tower.jpg
category: 'Travel'
tags: ['france', 'guide', 'tips']
---
Error:
TypeError
An error occurred.
Failed to parse URL from ../../assets/the-eiffel-tower.jpg
@prakash1763 @bcz3 this issue should be fixed now, the Image component was only allowing remote images due to the inferSize
attribute being used, sorry about taking so long to fix this
Hello sir thanks for the awesome starter template, clean, no style, and less framework. I want to ask how to add
og:image
andtwitter:image
meta tag on a page that does not contain a blog post? Like in home page, there doesn't seem to be any open graph and twitter card image. I see only blog posts that have it