@@ -9,7 +9,7 @@ const WebpackBar = require('webpackbar')
99const DependencyExtractionWebpackPlugin = require ( '@wordpress/dependency-extraction-webpack-plugin' )
1010const BundleAnalyzerPlugin = require ( 'webpack-bundle-analyzer' ) . BundleAnalyzerPlugin
1111
12- const WebpackImageSizesPlugin = require ( './WebpackImageSizesPlugin ' )
12+ const WebpackImageSizesPlugin = require ( './webpack-image-sizes-plugin ' )
1313
1414module . exports = {
1515 get : function ( mode ) {
@@ -33,7 +33,15 @@ module.exports = {
3333 } ) ,
3434 new DependencyExtractionWebpackPlugin ( ) ,
3535 new WebpackImageSizesPlugin ( {
36- watch : mode !== 'production' ,
36+ confImgPath : 'assets/conf-img' , // Path to the conf-img folder
37+ sizesSubdir : 'sizes' , // Subdirectory containing the sizes JSON files
38+ tplSubdir : 'tpl' , // Subdirectory containing TPL templates
39+ outputImageLocations : 'image-locations.json' , // Output locations file name
40+ outputImageSizes : 'image-sizes.json' , // Output sizes file name
41+ generateDefaultImages : true , // Generate default images
42+ defaultImageSource : 'src/img/static/default.jpg' , // Source image for generation
43+ defaultImagesOutputDir : 'dist/images' , // Default images output directory
44+ defaultImageFormat : 'jpg' , // Generated image format (jpg, png, webp, avif)
3745 } ) ,
3846 ]
3947
0 commit comments