Images max width

Images referenced in .html files can be limited to a max width.

export default {
  image: {
    srcset_max_width: 1300,  // Max width used in srcset
    max_width: 1300, // Max width of output image
  },
};

See configuration for default values.

Demo

SOURCE

JAMPACKED

_jampack index.html 491 index.html 667redpanda.jpg 2790013 redpanda.jpg 2790013 redpanda.webp 126714 [email protected] 82710

SOURCE

  • index.html 491
  • redpanda.jpg 2790013

JAMPACKED

  • _jampack
  • index.html 667
  • redpanda.jpg 2790013
  • redpanda.webp 126714
  • [email protected] 82710
Source Open in new tab
Jampacked Open in new tab
Terminal
__                                    __    
    |__|____    _____ ___________    ____ |  | __
    |  \__  \  /     \\____ \__  \ _/ ___\|  |/ /
    |  |/ __ \|  Y Y  \  |_> > __ \\  \___|    < 
/\__|  (____  /__|_|  /   __(____  /\___  >__|_ \
\______|    \/      \/|  |       \/     \/     \/
 v0.24.4              |__| by β€Ήdivβ€ΊRIOTS

Options:
{ onlyoptim: true }

Merging default config with:
{
  "image": {
    "srcset_max_width": 1300,
    "max_width": 1300
  }
}

 PASS 1 - Optimizing 
β–Ά index.html
Done: 979.962ms

 Summary 
╔═══════════╀════════════╀══════════╀════════════╀══════════╗
β•‘ Action    β”‚ Compressed β”‚ Original β”‚ Compressed β”‚     Gain β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ jpg->webp β”‚      1 / 1 β”‚  2.66 MB β”‚  123.74 KB β”‚ -2.54 MB β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ Total     β”‚      1 / 1 β”‚  2.66 MB β”‚  123.74 KB β”‚ -2.54 MB β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•


 βœ” No issues