Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for @nuxt/image #624

Open
giticon opened this issue Nov 6, 2020 · 17 comments
Open

Support for @nuxt/image #624

giticon opened this issue Nov 6, 2020 · 17 comments
Labels
enhancement New feature or request

Comments

@giticon
Copy link

giticon commented Nov 6, 2020

Support for @nuxt/image

@giticon giticon added the enhancement New feature or request label Nov 6, 2020
Copy link
Member

atinux commented Nov 10, 2020

It is planned :)

@atinux atinux self-assigned this Jan 14, 2021
@ay13
Copy link

ay13 commented Mar 22, 2021

Is there an update on this issue?

Copy link
Member

atinux commented Mar 23, 2021

No yet sorry, lot of work regarding the alpha of Nuxt 3 coming.

@atinux atinux removed their assignment May 24, 2021
@narduin
Copy link

narduin commented Jun 3, 2021

I don't know if it's officially supported but it currently works with one little "hack".
When using <nuxt-img/> inside a markdown nuxt-content file, everything after the image is not rendered (don't know why).

<!-- doesn't work -->
<nuxt-img
    src="https://"
    sizes="sm:100vw xl:728px"
    width="728"
    height="412"
    loading="lazy"
/>

But explicitly closing the tag works:

<!-- works -->
<nuxt-img
    src="https://"
    sizes="sm:100vw xl:728px"
    width="728"
    height="412"
    loading="lazy">
</nuxt-img>

@NozomuIkuta
Copy link
Collaborator

@narduin

It's written in documentation that:

Since @nuxt/content operates under the assumption all Markdown is provided by the author (and not via third-party user submission), sources are processed in full (tags included), with a couple of caveats from rehype-raw:
...

  1. You cannot use self-closing tags, i.e., this won't work:

@narduin
Copy link

narduin commented Jun 3, 2021

It's written in documentation that:

I didn't know that!
So I guess nuxt-image is now supported inside of nuxt-content 😃

Copy link
Member

atinux commented May 18, 2022

Linking to nuxt/image#500

Once Nuxt Image supports Nuxt 3, we will be able to work on it for Content V2.

@itpropro
Copy link
Sponsor Contributor

itpropro commented Sep 8, 2022

@atinux nuxt/image compatibility with Nuxt 3 started a while ago, when do you think we can expect nuxt/content integration or should it just work right now by adding the module?

Copy link
Member

atinux commented Sep 8, 2022

If you can try on your project and give me back feedback on it it would be great @itpropro, don't have the time right now to check.

Our main focus is 3.0 stable release before finishing our official modules

@itpropro
Copy link
Sponsor Contributor

itpropro commented Sep 8, 2022

The current version of Nuxt/Content (created wiht pnpm dlx nuxi init content-app -t content) doesn't start at all anymore, as soon as Content works again, I can create a repo repository for Nuxt/Image @atinux

Copy link
Member

atinux commented Sep 8, 2022

It works for me and in Sandbox: https://stackblitz.com/github/nuxt/starter/tree/content

@itpropro
Copy link
Sponsor Contributor

itpropro commented Sep 8, 2022

My mistake, I created for pnpm and was expecting to not need to specify --shamefully-hoist, overlooked that in the documentation. Maybe we can add a .npmrc file with shamefully-hoist=true to the project when using pnpm dlx to bootstrap.
I will test the nuxt/image module with some configs from another project and provide feedback here.

@tex0l
Copy link

tex0l commented Dec 9, 2022

Hi!
I have tried on nuxt@3.0.0, @nuxt/content@2.2.2 and @nuxt/image-edge@1.0.0-27827328.bc9ddc0, it doesn't work with :nuxt-img{src="/path/to/my/img"}, the components isn't found.

@tex0l
Copy link

tex0l commented Dec 9, 2022

see #390 (comment)

@hartmut-co-uk
Copy link

hartmut-co-uk commented Dec 9, 2022

see solution for current edge version (tested with @nuxt/image-edge:1.0.0-27821548.ab054e4) provided here: #390 (comment)

@giticon
Copy link
Author

giticon commented Dec 9, 2022

Hi! I have tried on nuxt@3.0.0, @nuxt/content@2.2.2 and @nuxt/image-edge@1.0.0-27827328.bc9ddc0, it doesn't work with :nuxt-img{src="/path/to/my/img"}, the components isn't found.

Try this <nuxt-img :src="path_img" />

@tex0l
Copy link

tex0l commented Jan 16, 2023

Hi! I have tried on nuxt@3.0.0, @nuxt/content@2.2.2 and @nuxt/image-edge@1.0.0-27827328.bc9ddc0, it doesn't work with :nuxt-img{src="/path/to/my/img"}, the components isn't found.

Try this <nuxt-img :src="path_img" />

No it doesn't work.

However this works: #390 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants