🍺 BREW Explorer

← all formulae

mozjpeg

brew install mozjpeg v4.1.5 IJG AND Zlib AND BSD-3-Clause keg-only

JPEG encoder library with improved compression efficiency, compatible with libjpeg API.

Why you might care

MozJPEG is a libjpeg-turbo drop-in replacement that achieves better compression ratios and visual quality for JPEG images. Use this as a build dependency if you're compiling image processing tools that need superior JPEG encoding. It's keg-only because it conflicts with standard libjpeg, so you'll need to explicitly link against it.

Categories

Alternatives

libjpeg libjpeg-turbo ImageMagick
1.8k
30-day installs · #1027
5.4k
90-day · #1054
16.6k
365-day · #1161
5.7k
★ GitHub stars · updated 12mo ago

Runtime dependencies

Build dependencies

GitHub topics

image-optimization jpeg-encoder libjpeg mozjpeg web-performance

Links

Keg-only reason

it conflicts with the standard libjpeg

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "libjpeg",
    "libjpeg-turbo",
    "ImageMagick"
  ],
  "build_dependencies": [
    "cmake"
  ],
  "categories": [
    "library",
    "image-tool",
    "compression"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "libpng"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Improved JPEG encoder",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:41:16+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "mozjpeg",
  "github_default_branch": "master",
  "github_last_commit_at": "2025-06-23T17:05:27Z",
  "github_readme_excerpt": "Mozilla JPEG Encoder Project [![Build Status](https://ci.appveyor.com/api/projects/status/github/mozilla/mozjpeg?branch=master\u0026svg=true)](https://ci.appveyor.com/project/kornel/mozjpeg-4ekrx)\n============================\n\nMozJPEG improves JPEG compression efficiency achieving higher visual quality and smaller file sizes at the same time. It is compatible with the JPEG standard, and the vast majority of the world\u0027s deployed JPEG decoders.\n\nMozJPEG is a patch for [libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo). **Please send pull requests to libjpeg-turbo** if the changes aren\u0027t specific to newly-added MozJPEG-only compression code. This project aims to keep differences with libjpeg-turbo minimal, so whenever possible, improvements and bug fixes should go there first.\n\nMozJPEG is compatible with the libjpeg API and ABI. It is intended to be a drop-in replacement for libjpeg. MozJPEG is a strict superset of libjpeg-turbo\u0027s functionality. All MozJPEG\u0027s improvements can be disabled at run time, and in that case it behaves exactly like libjpeg-turbo.\n\nMozJPEG is meant to be used as a library in graphics programs and image processing tools. We include a demo `cjpeg` command-line tool, but it\u0027s not intended for serious use. We encourage authors of graphics programs to use libjpeg\u0027s [C API](libjpeg.txt) and link with MozJPEG library instead.\n\n## Features\n\n* Progressive encoding with \"jpegrescan\" optimization. It can be applied to any JPEG file (with `jpegtran`) to losslessly reduce file size.\n* Trellis quantization. When converting other formats to JPEG it maximizes quality/filesize ratio.\n* Comes with new quantization table presets, e.g. tuned for high-resolution displays.\n* Fully compatible with all web browsers.\n* Can be seamlessly integrated into any program that uses the industry-standard libjpeg API. There\u0027s no need to write any MozJPEG-specific integration code.\n\n## Releases\n\n* [Latest release](https://github.com/mozilla/mozjpeg/releases/latest)\n* [Ove",
  "github_repo": "mozilla/mozjpeg",
  "github_stars": 5689,
  "github_topics": [
    "image-optimization",
    "jpeg-encoder",
    "libjpeg",
    "mozjpeg",
    "web-performance"
  ],
  "homepage": "https://github.com/mozilla/mozjpeg",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 1803,
  "installs_365d": 16573,
  "installs_90d": 5356,
  "keg_only": 1,
  "keg_only_reason": "it conflicts with the standard libjpeg",
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "IJG AND Zlib AND BSD-3-Clause",
  "llm_generated_at": "2026-06-20T23:48:31+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "mozjpeg",
  "oldnames": [],
  "one_liner": "JPEG encoder library with improved compression efficiency, compatible with libjpeg API.",
  "optional_dependencies": [],
  "rank_30d": 1027,
  "rank_365d": 1161,
  "rank_90d": 1054,
  "raw_hash": "e4f5d9ddf10abc30",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/m/mozjpeg.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "4.1.5",
  "versioned_formulae": [],
  "why_use_this": "MozJPEG is a libjpeg-turbo drop-in replacement that achieves better compression ratios and visual quality for JPEG images. Use this as a build dependency if you\u0027re compiling image processing tools that need superior JPEG encoding. It\u0027s keg-only because it conflicts with standard libjpeg, so you\u0027ll need to explicitly link against it."
}