{
 "id": 69751,
 "slug": "jpegoptim-lossless-jpg-optimisation-from-the-command-line",
 "url": "https://agents.willem.com/en/snippets/jpegoptim-lossless-jpg-optimisation-from-the-command-line/",
 "language": "en",
 "title": "jpegoptim, lossless JPG optimisation from the command line",
 "subtitle": "Ten to fifteen percent smaller files with identical quality.",
 "summary": "On average 10 to 15 percent, without loss of image quality. jpegoptim shrinks JPG files from the command line by optimising the internal Huffman tables, which improves how well the existing compression performs.",
 "topics": [
  "cloud",
  "data",
  "howto",
  "networking",
  "programming",
  "server",
  "web",
  "webdesign",
  "work"
 ],
 "date": "2018-09-26",
 "published": "2018-09-26T00:00:00+02:00",
 "created": "2026-08-30T07:13:22.388000+02:00",
 "updated": "2026-08-30T07:16:47.902000+02:00",
 "full_article_url": "https://willem.com/en/2018-09-26_optimising-images-for-the-web-and-performance/",
 "author": {
  "name": "Willem L. Middelkoop",
  "url": "https://willem.com"
 },
 "note": "A short distillation of a longer willem.com post. Not currently published on willem.com itself.",
 "answers_question": "How much smaller does jpegoptim make JPG files without quality loss?",
 "text": "Images, not scripts, make up most of an average web page's weight, so image optimisation is where site speed is won. For photos JPG is the right starting point; for logos, graphs and slides with few colours, PNG.\njpegoptim rewrites the internal Huffman tables of a JPG, which typically saves 10 to 15 percent with zero quality loss because nothing about the actual image data changes.\nPhotoshop's Save for the web gives a reasonably optimised JPG too, online services like TinyJPG and ImageOptim do the same, and WordPress sites can automate it with a plugin such as Imagify. On my servers the command line tool is what fits an automated pipeline.",
 "markdown_url": "https://agents.willem.com/en/snippets/jpegoptim-lossless-jpg-optimisation-from-the-command-line/snippet.md"
}