Markdown images

hi everyone,

I am using netlifycms with vuejs for some static stuff.
Now I am having an issue with images within blog markdown

From netlifycms admin ui i am publishing a new blog with images in body markdown.
The published json of the blog looks like that:
“time”: 60,
“category”: [
“Java design patterns”
“date”: “2020-05-26T11:22:55.802Z”,
“title”: "a new markdownblog “,
“image”: “/img/640.320.2.png”,
“body”: " ! [ picture ] (img/apicture.png)”

the first image (/img/640.320.2.png) is displayed.
But the markdown image in body part not. I tried a lot of things and I am somehow missing something :slight_smile: apicture.png is in the same folder as 640.320.2.png.
Does anybody have a hint how to get this working?
Appreciating your thoughts!

There’s two spaces in your Markdown code between the exclamation, brackets and parentheses. Your image is probably pulled in directly to the template, but the body image needs to be processed by Markdown. Remove the spaces and you should be good.

1 Like

actually i had to add some space do display it in that way because of the editor. in the real json there is no space…but thx for mentioning…i think that i dont get some basic stuff here

OK, that’s good that it’s just formatting. Next time use a code block and it should help. I notice your quotes are also all mixed up, but I’m going to assume that’s also the editor messing with it.

What are you using to display the body? Are you using a v-html directive, something like this:

<div v-html="body" />

i am using a markdown parser and passing the body to it

<vue-simple-markdown :source=b.body></vue-simple-markdown>

v-for to iterate through the json
<div v-for="(b,index) in filteredItems" :key="index">