#Tina cms - Image not found.

3 messages · Page 1 of 1 (latest)

obsidian reefBOT
#

Hi @bronze mauve. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

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:

  1. Check your Tina configuration in .tina/config.ts to ensure the media settings are properly configured:
media: {
  tina: {
    mediaRoot: "images",
    publicFolder: "public",
  },
},
  1. 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 ![alt](src)
  • Make sure you're importing images correctly if using the <Image /> component
#

If you're still having issues, could you share more details about how you're referencing the images in your MDX files and your Tina CMS configuration? That would help provide more specific guidance.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: