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

[nuxt3] Static image prerendering endless loop #662

Open
brunodeangelis opened this issue Nov 24, 2022 · 4 comments
Open

[nuxt3] Static image prerendering endless loop #662

brunodeangelis opened this issue Nov 24, 2022 · 4 comments

Comments

@brunodeangelis
Copy link

brunodeangelis commented Nov 24, 2022

See reproduction: https://github.com/brunodeangelis/nuxt3-image-endless-loop

Static prerendering introduced in #614 seems to be generating an endless loop when running yarn generate. This seems to be associated in some way with the format option
Screenshot 2022-11-24 at 18 18 52

If I let it run, it just keeps creating more and more directories as seen here:
Screenshot 2022-11-24 at 18 21 45

Any help appreciated, thank you

@Triloworld
Copy link

Can you provide on https://stackblitz.com/ minimal reproduction and share there? Everyone can help better

@brunodeangelis

This comment was marked as outdated.

@brunodeangelis
Copy link
Author

brunodeangelis commented Nov 24, 2022

@Triloworld I just pushed a reproduction repo for you to check. Some instructions in the README. Thank you.
https://github.com/brunodeangelis/nuxt3-image-endless-loop

@Tuuuukka
Copy link

Tuuuukka commented Dec 15, 2022

Happens for me too, although it's not endless. But it's still folder after folder after folder after folder and so on.

  image: {
    presets: {
      test: {
        modifiers: {
          format: 'jpg',
          width: 60,
          height: 60
        }
      }
    }
  }

and

<nuxt-img src="/testimage.jpg" preset="test" />

renders as

<img src="/_ipx/f_jpg,s_60x60/testimage.jpg">

and results in the loop mentioned. It doesn't matter if the image exists anywhere or not, using custom dir makes no difference and changing the format has no effect.

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

No branches or pull requests

3 participants