Sign inSign up

343dev/optimizt

By 343dev

•Updated 2 days ago

CLI image optimization tool

Image
Developer tools
0

4.2K

343dev/optimizt repository overview

⁠@343dev/optimizt⁠

Optimizt logo: OK hand sign with Mona Lisa image between the fingers

npm Docker

Optimizt is a command-line tool that helps prepare images for the web.

It can compress PNG, JPEG, GIF, and SVG lossy or lossless, and create AVIF and WebP versions for raster images.

⁠Rationale

As frontend developers, we have to care about pictures: compress PNG and JPEG, remove useless parts of SVG, create AVIF and WebP for modern browsers, and so on. One day, we got tired of using a bunch of apps for that, and created one tool that does everything we want.

⁠Usage

# mount current directory to /src in the container
docker run --rm --volume $(pwd):/src 343dev/optimizt --webp ./image.png

⁠Command Line Flags

  • --avif — create AVIF versions of images.
  • --webp — create WebP versions of images.
  • -f, --force — recreate AVIF and WebP versions even if they already exist.
  • -l, --lossless — optimize losslessly instead of lossily.
  • -v, --verbose — show detailed output (e.g. skipped files).
  • -c, --config — use a custom configuration file instead of the default.
  • -o, --output — write results to the specified directory.
  • -p, --prefix — add prefix to optimized file names.
  • -s, --suffix — add suffix to optimized file names.
  • -V, --version — display the tool version.
  • -h, --help — show help message.

⁠Credits

Cute picture for the project was made by Igor Garybaldi⁠.

Tag summary

Content type

Image

Digest

sha256:a047014ea…

Size

71.6 MB

Last updated

2 days ago

docker pull 343dev/optimizt