nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.09k stars 623 forks source link

Nuxt image not working #1821

Open FabienVINCENT opened 1 year ago

FabienVINCENT commented 1 year ago

Environment

Nuxt project info: 23:35:51


Reproduction

Install nuxt-content Install @nuxt/image-edge add :nuxt-img{src="https://placekitten.com/1000/300"} in a .md file

Describe the bug

The component won't load

Additional context

No response

Logs

[Vue warn]: Failed to resolve component: nuxt-img                                                                                                                                                                                                                                                                                                                        23:37:40
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
ZacJenks-campbell commented 1 year ago

I am getting: [Vue warn]: Failed to resolve component: nuxt-img. I saw a similar issue 435, that was moved to issue 500 and I am wondering if there is a reason that the component isn't being resolved. I have the component registered in nuxt.config.ts as '@nuxt/image-edge' and the requisite image settings in the same file. Any suggestions would be much appreciated.

toniengelhardt commented 1 year ago

Have the same issue...

@ZacJenks-campbell did you find a solution by now?

nobkd commented 1 year ago

I think, that's because the component isn't registered globally.

Maybe this discussion https://github.com/nuxt/content/discussions/2082#discussioncomment-6105683 referencing this https://github.com/nuxt/content/issues/390#issuecomment-1344593577 helps