-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add Example to Next.js Repo #29
Comments
I'm so glad! Just left some feedback on the PR, but really it looks great. Figuring out how to wire this stuff up correctly isn't trivial, and your example is very clean and well-organized. Thank you for the contribution! |
vercel/next.js#16613 was merged this morning! Closing this issue 🥳 thanks for your feedback @jescalan! |
@daneden @jescalan Would love if it included an image example. I've been trying to add images but can't seem to figure it out. The image doesn't load & gives the url My setup is the same as the example in Next.js repo 👍 Would love any pointers? Edit: I also tried using a custom component |
@deadcoder0904 I believe this is because Nextjs out of the box does not have an image loader for consuming images by import, which does not have anything to do with the MDX files. If you want to use an image in MDX, it would have to be placed in the |
Exactly correct @brianespinosa - thanks for the quick response here! |
@brianespinosa I have all my images inside individual posts like Based on your response, I tried next-optimized-images@canary but still don't know how to configure the path, which is my main problem. Can you point me in the right direction as Google isn't helping out much? If you know any example project, then it might do as well :) |
|
@jescalan Hi, I understand that this lib is designed to treat markdown content as data which means we cannot process the markdown content using webpack loaders. My question is, does that mean this lib is not going to work with this Image Optimization RFC? |
@dpyzo0o for image optimization, typical In theory if you knew what those output paths were going to be, you could hard code them on images yourself... which would probably be a lot of work. Another possibility would be if there is a Remark plugin that did this. It would not be part of the Nextjs image optimization tooling, but it would essentially allow you to implement your own for the Markdown files. Incidentally... I just saw this package that was published as an alpha release just this month that looks like it is going in the right direction. https://www.npmjs.com/package/@fec/remark-responsive-images |
Correct - since the files do not pass through webpack they will require an alternate solution here with regard to image optimization. |
@brianespinosa @jescalan Thanks for reply. Remark plugin seems to be the right way to do it. I was searching something equivalent to gatsby-remark-images but with no luck. |
Hi there! I recently moved from
next-mdx-enhanced
tonext-mdx-remote
and saw a huge gain in build performance. Thanks for this work!I wanted to contribute an example for this repo into the Next.js repo, and opened a pull request here: vercel/next.js#16613
Please feel free to let me know if you have feedback on the proposed example.
The text was updated successfully, but these errors were encountered: