You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey team. So I've been wanting to use this library for a project I'm working on, but I've run into an issue. When I try to use this, I'm just unable to get it to work and I was reaching out here to see if someone could assist.
The above repo has a static portion I want to use and inside of components/newsletter/newsletter.coverimage.js is where I wanted to use next-optimized-images. I followed the readme pretty closely but I wasn't able to get anything to render and wanted to ask why. I feel I setup my next.config.js correctly and was using the provided
Any help would be greatly appreciated as I feel I'm overlooking some basic but key information.
The text was updated successfully, but these errors were encountered:
So i think that your issue is actually coming from the fact that this plugin still looks for static as the path for images. You are using nextJS 9 which has switched to public as opposed to static. Im trying to use this package as well and that's the road block i believe that im running into @Joey-Robinson
It shouldn't matter where your images are located. When using them, you need to specify relative paths to them, so they should start with a ./ just like when you are importing other components/js files.
So instead of require('assets/image.jpg'), use require('./path-to-assets-folder/image.jpg') (same works with import statements).
If I've misunderstood your problem and that doesn't solve it, please provide the problematic code snippets if possible so it is easier to understand the actual problem.
Just to make sure we're on the same page, using This repo, I'd do something like require('./assets-path/image.jpg`) but I'd have to do that for each image? Or could I just target that folder and import the image for each file association
Hey team. So I've been wanting to use this library for a project I'm working on, but I've run into an issue. When I try to use this, I'm just unable to get it to work and I was reaching out here to see if someone could assist.
https://github.com/Joey-Robinson/quick-anime-next
The above repo has a static portion I want to use and inside of components/newsletter/newsletter.coverimage.js is where I wanted to use next-optimized-images. I followed the readme pretty closely but I wasn't able to get anything to render and wanted to ask why. I feel I setup my next.config.js correctly and was using the provided
Any help would be greatly appreciated as I feel I'm overlooking some basic but key information.
The text was updated successfully, but these errors were encountered: