#Tina cms - Image not found.
3 messages · Page 1 of 1 (latest)
I can help with your Tina CMS image issue in Astro. The "Image not found" error typically occurs when Astro can't locate an image you're trying to reference.
Based on the information provided, here are some potential solutions:
Check your image paths
The most common cause of this error is incorrect file paths. In Markdown and MDX files, image paths are relative to the current file.
- If the image is in the same folder as your MDX file, make sure to start the path with
./ - Double-check for typos in your file paths
- Verify that the image actually exists at the specified location
As mentioned in the error documentation:
ImageNotFound: Could not find requested image. Does it exist? Often, this is simply caused by a typo in the path.
Image not found error
Tina CMS specific considerations
When using Tina CMS with Astro, you need to ensure your media configuration is correct:
- Check your Tina configuration in
.tina/config.tsto ensure the media settings are properly configured:
media: {
tina: {
mediaRoot: "images",
publicFolder: "public",
},
},
- You might want to look at this community resource that specifically addresses using Astro's image optimization with Tina CMS: Using Astro's Image Optimization with Tina
Image handling in Astro
Remember that Astro has specific ways to handle images:
- For MDX files, you can use the
<Image />component, standard JSX<img />tags, or Markdown image syntax - Make sure you're importing images correctly if using the
<Image />component