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

Next is not serving image files from _document.js #15

Closed
felipero opened this issue Apr 13, 2018 · 4 comments
Closed

Next is not serving image files from _document.js #15

felipero opened this issue Apr 13, 2018 · 4 comments
Assignees
Labels
bug Something isn't working resolved Resolved issues

Comments

@felipero
Copy link

felipero commented Apr 13, 2018

When requiring images from pages/_document.js the file is created by webpack, but next won't serve it. See the image below:

screenshot 2018-04-13 18 36 19

I also created a repo to reproduce that: https://github.com/felipero/next_images_bug/tree/next-optimized-images

@cyrilwanner
Copy link
Owner

Hi @felipero
Thank you for the bug report and the example project, it helps a lot!
I could reproduce the issue and I'm currently working on a fix.

@cyrilwanner cyrilwanner added the bug Something isn't working label Apr 15, 2018
@cyrilwanner cyrilwanner self-assigned this Apr 15, 2018
@cyrilwanner
Copy link
Owner

I just published a new version to npm which resolves this issue. Thanks again for the bug report :)

I noticed that you were using next-images in your example but this is the repository of next-optimized-images. These are two different plugins but both had the same bug. I only fixed it in this one as I'm not the creator of the other one.
So, if you want to use the other plugin (next-images), you may also want to create an issue in their repository.

@felipero
Copy link
Author

Hi @cyrilwanner That great. Thanks for fixing that so fast. I also opened an issue on next-images (here: twopluszero/next-images#4)

In my repository there is a branch for next-optmized-images. Same issue for both plugins. :)

@cyrilwanner
Copy link
Owner

Ah sorry, I didn't see your other branch :)
Perfect, looks like the issue is now resolved in both plugins 🎉

@cyrilwanner cyrilwanner added the resolved Resolved issues label Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Resolved issues
Projects
None yet
Development

No branches or pull requests

2 participants