No optimizations are happening
See original GitHub issuePackages:
{
"babel-plugin-styled-components": "^1.10.7",
"dotenv-webpack": "^1.7.0",
"file-loader": "^6.0.0",
"image-trace-loader": "^1.0.2",
"imagemin-gifsicle": "^7.0.0",
"imagemin-mozjpeg": "^8.0.0",
"imagemin-optipng": "^7.1.0",
"imagemin-svgo": "^7.1.0",
"jimp": "^0.10.1",
"lqip-loader": "^2.2.0",
"next-videos": "^1.1.4",
"responsive-loader": "^1.2.0",
"svg-sprite-loader": "^4.2.5",
"webp-loader": "^0.6.0",
"next-compose-plugins": "^2.2.0",
"next-optimized-images": "^2.5.7"
}
Build script:
next build && next export -o build/
Next config
// next.config.js
const withPlugins = require('next-compose-plugins');
const optimizedImages = require('next-optimized-images');
const withVideos = require('next-videos');
const Dotenv = require('dotenv-webpack');
const nextConfig = {
webpack: (config, options) => {
config.plugins.push(new Dotenv({ silent: true }));
return config;
},
};
module.exports = withPlugins([
[optimizedImages, {}],
[withVideos, {}],
// your other plugins here
], nextConfig);
When requiring an image like so:
require("../assets/img/content/blog-header.jpg").default
and running
npm build
I still get the original image:
http://localhost:8000/_next/static/images/blog-header-e92e08032b49a33b9e710b97acbd569a.jpg
I’m expecting to get a webm
image or at least a much smaller image but nothing seems to be happening.
When adding ?lqip
to an image, I get
TypeError: Cannot read property '1' of null
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
GCC Why Non Run Optimization All Time? - Stack Overflow
There are a few reasons. 1. Compilation takes longer time. For small and even medium sized projects, this is rarely an issue today....
Read more >Optimize Options (Using the GNU Compiler Collection (GCC))
Without any optimization option, the compiler's goal is to reduce the cost of compilation and to make debugging produce the expected results.
Read more >How to prevent optimization of a variable
If the variable is no longer in scope, it should be destroyed. If you want it to have a longer lifetime, move it...
Read more >Arm Compiler for Embedded User Guide - Arm Developer
Arm® Compiler for Embedded performs several optimizations to reduce the code size and improve the ... Faster compile and build time, -O0 (no...
Read more >Options That Control Optimization — gcc 6 documentation
Without any optimization option, the compiler's goal is to reduce the cost of compilation and to make debugging produce the expected results.
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 Free
Top 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
@durchanek makes sense. I’ll close this issue as I think it’s a PEBCAK =) Thanks for the help!
@jordyvandomselaar Yeah, it will not, but you can use Modernizr together with a SASS mixin or a JSS function.