optimize_jpg_files
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
optimize_jpg_files [2020/10/04 15:35] – created dino | optimize_jpg_files [2024/03/12 21:23] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | **Install jpegoptim** | + | **Install jpegoptim** |
sudo apt-get install jpegoptim | sudo apt-get install jpegoptim | ||
- | **How to compress a file** | + | |
+ | **How to compress a file**\\ | ||
jpegoptim filename.jpeg | jpegoptim filename.jpeg | ||
- | **To compress above the image from 5.6MB to around 500k.** | + | **To compress above the image from 5.6MB to around 500k.**\\ |
$ jpegoptim --size=500k filename.jpeg | $ jpegoptim --size=500k filename.jpeg | ||
- | **Compress all images at once.** | + | **Compress all images at once.**\\ |
jpegoptim *.JPG | jpegoptim *.JPG | ||
+ | |||
+ | |||
+ | Optimize PNG | ||
+ | |||
+ | < | ||
+ | |||
+ | To optimize a PNG file, run | ||
+ | |||
+ | < | ||
+ | |||
+ | -o selects the optimization level. The higher the level, the more compression trials. OptiPNG optimizes the given file in-place. | ||
+ | |||
+ | To make the file further smaller, we can remove the metadata from the PNG file by specifying --strip all: | ||
+ | |||
+ | < |
optimize_jpg_files.1601825725.txt.gz · Last modified: 2024/03/12 21:24 (external edit)