I can not import Image component from next/image
See original GitHub issuemdx-bundler
version: ^5.2.1node
version: v16.3.0npm
version: 7.20.1
Relevant code or config
import * as React from 'react'
import Image from 'next/image'
function EsstentialismGraph() {
return (
<div className="mt-4 flex justify-center">
<Image src={'/essentialism_graph.svg'}
alt="Tư tưởng cốt lõi và không cốt lõi"
layout="intrinsic"
width={250}
height={300} />
</div>
)
}
export default EsstentialismGraph
What you did: Thank you for an amazing project! I try to import EsstentialismGraph
component to the MDX file but it turns out I get an error about the process. I figured out the problem was I used Image
component from next.
What happened:
Reproduction repository:
Problem description:
Suggested solution:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
Can't import Image from 'next/image' - Stack Overflow
I've created a NextJS project, but I'm not able to import the Image component. I've already imported other components from NextJS (e.g. Head ......
Read more >next/image - Next.js
The <Image /> component requires the following properties. src. Must be one of the following: A statically imported image file ...
Read more >How to add an image in next.js? - Medium
By default, next.js adds lazy load and eager is not good for image optimization. import Image from 'next/image' import mypic from '.
Read more >How to import image in Next.js ? - GeeksforGeeks
In this article, we will learn to import images in Next.js using the Image component. Image component in Next.js (next/image): Next.js Image ......
Read more >Image component does not work with Storybook · Issue #18393
js 11 and being able to use image imports like I would in Next. Next's webpack config uses next-image-loader for static image imports....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As far as I am aware
next/image
needs to be supplied as a global so that it comes from the next.js app iinstead of being imported seperately. The same is true fornext/link
.I’m not sure to understand how to do that. I added
to the
bundleMDX
function and providedto the page component, but still receive this error whenever I import a component using next/image :
ReferenceError: process is not defined
Am I missing something here ?