Nick S
Nick S

Reputation: 621

Can I put images in the same directory as my markdown with NuxtJS Content?

I'm trying to make a static markdown site with Nuxt.js (and the @nuxtjs/content plugin) and I'd like my authors to be able to keep the images for a particular post in the same directory as the markdown. It'd be a lot easier for them to organize the content that way instead of splitting it between the content and assets directories.

The images that are more widely useful across the site can go in assets of course, but there's lots of images that will only ever be applicable to one post.

I've tried all of the following, and they all create an <img> with the given src, but the image doesn't exist at that url. Instead I get a 1x1 gif.

![alt text](bwa_059.png)

![alt text](./bwa_059.png)

<img src="bwa_059.png"/>

<img src="./bwa_059.png"/>

Is this possible with Nuxt? I'm kinda surprised I haven't found anyone else even asking about this, since it seems like an author-friendly way of organizing the content.

Upvotes: 2

Views: 329

Answers (1)

xddq
xddq

Reputation: 381

uhm sorry to ask this but how can you include the images, if they are stored in the assets folder? I am failing terribly at this and don't really know why..

I was also surprised how little comes up on this topic..

Upvotes: 1

Related Questions