#Path to images in markdown files
7 messages · Page 1 of 1 (latest)
You could also do:
src/content/episodes/episode1/index.md
src/content/episodes/episode1/image.jpg
if you want to co-locate stuff in the same folder
thanks. and Astro's markdown doesn't support sizing with e.g =200x100 , right?
I think you might be able to do something with remark or rehype plugins, but not sure. If you're using MDX, then you can use Astro's <Image /> component and uset sizes.
thanks! the only issue with <Image /> in mdx, is it appears you have to import each image at the top, which is a bit less 'friendly'
I think you can do something like this, as long as the file extension is hard-coded and not part of the literal string.
<Image src={import(`../${imgSource}.png`)} alt="whatever" />