Minomax Configuration
Welcome to the Minomax configuration guide. This page will help you understand how to configure Minomax to suit your web optimization needs. Minomax offers flexible and powerful settings to ensure your web assets are optimized effectively.
Configuration File: minomax.config.json
The minomax.config.json
file is where you define your settings for Minomax. Below is an example configuration file along with explanations for each section.
{
"imageSetConfigurations": {
"screenSizes": {
"1X": 600,
"2X": 1080,
"3X": 1920,
"4X": 2560,
"5X": 3840
},
"upscaleLevel": "level2"
},
"destPath": "./dist"
,
"encodeOptions": {
// ⚠️ Nerd alert! Advanced options => Image Encoding options for image file types such as jpg, webp, & avif
},
"webdoc": {
// ⚠️ Nerd alert! Advanced options => Encoding options for webdocs such as html, js & css
},
}
Sections Explained
-
imageSetConfigurations:
This section is crucial for defining how Minomax handles image set generation for different devices. You can specify the screen sizes and the upscale level.
- screenSizes: Defines the width in pixels for different screen size categories. This helps generate responsive image sets.
- upscaleLevel: Determines the level of upscaling applied to images. Common levels include "level1", "level2" & "level3" (Intensity and Computational costs increases as level increases).
"imageSetConfigurations": { "screenSizes": { "1X": 600, "2X": 1080, "3X": 1920, "4X": 2560, "5X": 3840 }, "upscaleLevel": "level2" }
-
destPath:
This option sets the destination path where the optimized files will be saved.
"destPath": "./disr"
-
encodeOptions:
This section defines encoding options for different file types of images such as jpg, webp and avif. You can customize settings like compression level, format, and quality here.
"encodeOptions": {
"cpuAllocation": 10,
"jpgEncodeOptions": {
"mozjpeg": {
"quality": 60,
"color_space": 3,
"auto_subsample": false,
"chroma_subsample": 4,
"progressive": true,
"smoothing": 0,
"quant_table": 2,
"trellis_multipass": true,
"trellis_opt_zero": true,
"trellis_opt_table": true,
"trellis_loops": 50,
"separate_chroma_quality": false,
"chroma_quality": 75
}
},
"webpEncodeOptions": {
"webp": {
"method": 6,
"quality": 50,
"alpha_compression": 1,
"alpha_quality": 100,
"alpha_filtering": 0,
"autofilter": 0,
"filter_strength": 0,
"filter_type": 0,
"filter_sharpness": 7,
"pass": 10,
"use_sharp_yuv": 0,
"sns_strength": 0,
"preprocessing": 1,
"segments": 4,
"partitions": 3
}
},
"avifEncodeOptions": {
"avif": {
"cqLevel": 35,
"subsample": 1,
"cqAlphaLevel": -1,
"chromaDeltaQ": true,
"sharpness": 0,
"denoiseLevel": 0,
"tune": 2,
"speed": 0
}
},
"svgOptions": {
"multipass": true,
"plugins": [
{
"name": "preset-default",
"params": {
"overrides": {
"removeDoctype": true,
"removeXMLProcInst": true,
"removeComments": true,
"removeMetadata": true,
"removeEditorsNSData": true,
"cleanupAttrs": true,
"mergeStyles": true,
"inlineStyles": true,
"minifyStyles": true,
"cleanupIds": true,
"removeUselessDefs": true,
"cleanupNumericValues": true,
"convertColors": true,
"removeUnknownsAndDefaults": true,
"removeNonInheritableGroupAttrs": true,
"removeUselessStrokeAndFill": true,
"removeViewBox": false,
"cleanupEnableBackground": true,
"removeHiddenElems": true,
"removeEmptyText": true,
"convertShapeToPath": true,
"moveElemsAttrsToGroup": true,
"moveGroupAttrsToElems": false,
"collapseGroups": true,
"convertPathData": true,
"convertEllipseToCircle": true,
"convertTransform": true,
"removeEmptyAttrs": true,
"removeEmptyContainers": true,
"mergePaths": true,
"removeUnusedNS": true,
"sortAttrs": true,
"sortDefsChildren": true,
"removeTitle": true,
"removeDesc": true
},
"floatPrecision": 1,
"transformPrecision": 0,
"leadingZero": false
}
},
{
"name": "cleanupListOfValues",
"params": {
"floatPrecision": 1,
"leadingZero": false
}
},
"removeRasterImages",
"reusePaths",
"removeScriptElement",
"removeOffCanvasPaths",
"removeDimensions"
]
}
}
- webdoc:
This section includes options specific to web document compression. You can enable or disable minification and other optimization settings.
"webdoc": {
"htmloptions": {
"removeComments": true,
"removeRedundantAttributes": true,
"collapseWhitespace": true,
"html5": true,
"minifyCSS": true,
"minifyJS": true,
"quoteCharacter": "'",
"removeEmptyAttributes": true,
"removeScriptTypeAttributes": true,
"removeStyleLinkTypeAttributes": true,
"removeTagWhitespace": true
}
}
Thank you for choosing Minomax to optimize and elevate your web projects!
Keywords:
- Minomax configuration
- Web optimization settings
- Image set generation
- Screen sizes
- Upscale levels
- Encoding options
- Image compression
- Web document compression
- Minification