Closed kirill-konshin closed 6 years ago
I had this issue it turned out the the limit was too low: https://github.com/arefaslani/next-images/blob/master/index.js#L16
I fixed it by just adding this rule to the config manually like:
config.module.rules.push({ // separate rule for svg so we can have no limit
test: /\.svg$/,
use: [
{
loader: "url-loader",
options: {
fallback: "file-loader",
publicPath: "/_next/",
outputPath: "static/images/",
name: "[name]-[hash].[ext]"
}
}
]
});
@realalexhomer The limit is for creating base64 string from images under 8KBytes and insert image links for files more than 8Kbytes.
@kirill-konshin It was a problem in my webpack config. I've corrected the public path. A new version (0.9.2) is available that solved this issue.
Confirmed, it works.
I have following
next.config.js
:And this is the component:
Here is what I get: