Closed thanhtoan1196 closed 3 years ago
+1 facing this issue as well
You shouldn’t call the function after requiring the package. Please change the require statement to:
- const withImages = require('next-images')();
+ const withImages = require('next-images');
I'll close this issue and consider this problem as solved. Please fill free to reopen it if the problem still exists.
Hello!
I'm reopening the issue because I keep having the exact same issue with the solution @arefaslani provided.
In component file:
<img src={require('../static/images/icon.png')} />
Innext.config.js
:Error:
Version: 1.6.2