Problem connecting the CMS articles with the blog-images in Resources

I am trying to create a blog using CMS where the images are placed in a subfolder in Resources.

In the blog markdown files, the images are references as in the same folder as the blog items themselves.

Is it understandable what I am trying to do here? Is what I am trying here at all possible without renaming the image URLs in all the blog markdown files or moving all images inside the blog article folder?

Best regards,

Kjell Are

Hi,

Perhaps try to write all in lower-case (Resources > resources, IMG_4582-scaled.jpeg > img_4582-scaled.jpeg).

Yes, your server may be case-sensitive, please ensure all resources are referenced in lowercase in your markdown files.

I am not entirely sure that case-sensitivity is the issue here. I wonder if we could have @ben show us a CMS setup that has articles with images in the local resources folder rather out on the web with full URLs?

Your frontmatter in the Markdown file should ideally look like this:

image:
    src: "/post_images/IMG_4582_scaled.jpeg"
    title: ""
    alt: ""
    copyright: ""
    type: remote
---

And then you enter this Twig syntax in the Image component under Type: CMS: {{ item.image.src }}

If you want to name the image source in your frontmatter coverImage instead, you’ll need to adjust the Twig syntax accordingly and insert the following in CMS: {{ item.coverImage.src }}

I think @Pegasus is on the right track here.

@refsvik have you tried following the steps in Pegasus’s reply?

Yes. A combination of fixes worked out. Lower case, removing a wrong path-addition to the location of the images as noted by @Pegasus and also noticing that my Wordpress markdown conversion has given me image references to “coverImage” and not Image: src:

coverImage still works, but I may still end up changing it all to align my markdown files with the demo video from @ben .

Thanks for constructive input to all!