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

Issue: I don't see the generated images? #34

Open
justindasilva opened this issue Nov 17, 2020 · 1 comment
Open

Issue: I don't see the generated images? #34

justindasilva opened this issue Nov 17, 2020 · 1 comment

Comments

@justindasilva
Copy link

justindasilva commented Nov 17, 2020

My nuxt.config:

modules: [
    ['@pivale/nuxt-image-loader-module', {
      imagesBaseDir: 'assets/img',
      imageStyles: {
        thumbnail: { actions: ['gravity|Center', 'resize|320|180^', 'extent|320|180|+0|+90'] },
      },
    }],
  ],

I have images located in static/img which weren't loading.
I then tried moving my images to assets/img and I still can't seem to see them?

When I run yarn run dev, should a image-styles directory be created automatically? I don't see it.

Is there some way for me to force run the creation of images? I'm still wondering if I have graphicsmagick installed correctly. I ran brew install graphicsmagick.

Any clues what I might be doing wrong?

@brianssparetime
Copy link

brianssparetime commented Sep 15, 2021

I'm having the same issue.....

I'm trying to add dynamic image scaling to my website because I've been posting a lot of large images and it's starting to load quite slowly. The code is available on github in a branch for this feature. The site is statically deployed.

I've added the code suggested in the setup section of the readme to my nuxt.config.js, created a new vue component VImgNew which calls <nuxt-img>. A test post compares the new and old components.

The problem is that the pivale image loader does not seem to be creating the image-styles folder in /static, and is definitely not populating it with smaller images. When running in devmode, the v-img-new component doesn't show any image in the rendered page and the dev console indicates a 404 error trying to load the correct path to the thumbnail. I've read the documentation, and added the forceGenerateImages bit to the nuxt.config.js to support lazy loading, but that doesn't seem to do anything. I am also using yarn instead of npm to the extent that matters.

GM is installed correctly on my system, and a small test program using the node GM module does work correctly, as does just calling gm from the command line.

I'm at a loss for how to debug this further or gain any insight into where the problem lies. My console doesn't show any errors or warnings for me to follow.

Any guidance or suggestions would be greatly appreciated! And a kind thank you for your work on this project!

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

2 participants