-
Notifications
You must be signed in to change notification settings - Fork 91
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
Images are "broken" icon, no errors in console #223
Comments
Same here today. const withPlugins = require('next-compose-plugins');
const withOptimizedImages = require('next-optimized-images');
const withPWA = require('next-pwa');
/* const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
}); // only for Dev-Phase, REMOVE for production!
*/
const nextConfig = {
webpack(config) {
config.module.rules.push(
{
test: /\.(eot|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
esModule: false,
name: '[name].[ext]',
},
},
},
{
test: /\.ya?ml$/,
use: 'js-yaml-loader',
}
);
return config;
},
};
module.exports = withPlugins(
[
[
withOptimizedImages,
{
optimizeImagesInDev: true,
handleImages: ['jpg', 'jpeg', 'png', 'svg', 'webp', 'gif'],
},
],
// [withBundleAnalyzer],
],
nextConfig
); In my webpack-config : At least it depends on the way next-optimized-images work. It injects files with smaller-file-size as |
Yes!!! @xstable You're a hero! It was my |
What i see in the browser:
![image](https://user-images.githubusercontent.com/34871211/103699323-0eb5ef80-4fa3-11eb-9885-fe0d4803b75a.png)
I have all optional packages installed, and sharp. Both the dev (using
optimizeImagesInDev
) as well as the static site build show this broken icon.I've also tried appending
?webp
but same result.React:
next.config.js
:HTML in browser:
When opened in a new tab:
![image](https://user-images.githubusercontent.com/34871211/103699778-be8b5d00-4fa3-11eb-9dd6-b4053587ac8f.png)
In the
![image](https://user-images.githubusercontent.com/34871211/103699832-d2cf5a00-4fa3-11eb-908c-0dae579f9771.png)
Sources
tab:The text was updated successfully, but these errors were encountered: