{"id":1478,"date":"2021-12-16T13:42:40","date_gmt":"2021-12-16T10:42:40","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/06\/24\/how-to-compress-png-files-on-linux\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/06\/24\/how-to-compress-png-files-on-linux\/"},"modified":"2021-12-16T13:42:40","modified_gmt":"2021-12-16T10:42:40","slug":"how-to-compress-png-files-on-linux","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1478-how-to-compress-png-files-on-linux\/","title":{"rendered":"How to compress PNG files on Linux"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Are you looking to compress some PNG images on your Linux PC? Can\u2019t figure out how to compress PNGs? We can help! In this guide, we\u2019ll go over two great ways you can compress your PNG image files on Linux.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404885 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux.png\" alt=\"compress PNG files on Linux\" width=\"1200\" height=\"480\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-3.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-4.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-5.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>Need to compress other image types? Check out Curtail for Linux.<\/p>\n<h2>Method 1 \u2013 PNG Quant<\/h2>\n<p>If you need to compress PNG files on Linux, the quickest way to do it is with PNG Quant. It\u2019s a tool dedicated to only compressing PNG files and no other file types. It works through the terminal and is supported on a wide variety of Linux operating systems.<\/p>\n<p>To start the installation of PNG Quant on your Linux PC, you\u2019ll need to open up a terminal window. You can open up a terminal window on the Linux desktop by pressing\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong> on the keyboard. You can also open up a terminal window by searching for \u201cTerminal\u201d in the app menu.<\/p>\n<p>With the terminal window open, follow the command-line installation instructions below that correspond to the Linux operating system you use on your computer.<\/p>\n<h4>Ubuntu<\/h4>\n<p>The PNG Quant program can be installed on Ubuntu Linux using the following\u00a0<strong>apt install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo apt install pngquant\n<\/pre>\n<h4>Debian<\/h4>\n<p>If you\u2019re using Debian 9, 10, or 11, you\u2019ll be able to install PNG Quant on your system using the following\u00a0<strong>apt-get install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo apt-get install pngquant\n<\/pre>\n<h4>Arch Linux<\/h4>\n<p>Those on Arch Linux can get the PNG Quant application up and running from the \u201cCommunity\u201d software repository using the\u00a0<strong>pacman\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo pacman -S pngquant\n<\/pre>\n<h4>Fedora<\/h4>\n<p>Those on Fedora Linux can get the latest PNG Quant (provided you\u2019re using Fedora 33 or newer) up and running on your system using the following\u00a0<strong>dnf install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo dnf install pngquant\n<\/pre>\n<h4>OpenSUSE<\/h4>\n<p>The PNG Quant application is up and available for all OpenSUSE Linux users. You can install it on your system with the following\u00a0<strong>zypper install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo zypper install pngquant\n<\/pre>\n<h4>Generic Linux<\/h4>\n<p>You should be able to find PNG Quant on your Linux PC, even if we didn\u2019t cover it in the installation instructions here. To get it working, search \u201cpngquant\u201d in the terminal using the program you use to install software on your system. Alternatively, head over to the official PNG Quant website and follow the installation instructions.<\/p>\n<h3>Using PNG Quant to compress one image<\/h3>\n<p>To compress a single image using PNG Quant, open up a terminal window. From there,\u00a0<strong>CD\u00a0<\/strong>into the directory that the image file is at. For example, to compress a PNG image in the \u201cPictures\u201d folder, you\u2019d do:<\/p>\n<pre>\ncd ~\/Pictures\/\n<\/pre>\n<p>Once in the directory with the image file, you can compress your single PNG file using the\u00a0<strong>pngquant\u00a0<\/strong>command.\u00a0<\/p>\n<pre>\npngquant my-png-file.png\n<\/pre>\n<p>When the conversion is complete, you\u2019ll see a second PNG file with the \u201cFs8\u201d in the file name.<\/p>\n<h3>Using PNG Quant to compress multiple images<\/h3>\n<p>It is possible to compress more than one PNG file at a time with the PNG Quant tool. To do it, start by accessing the directory that the image files are in. For example, if your files are in \u201cPictures,\u201d enter the command below.<\/p>\n<pre>\ncd ~\/Pictures\/\n<\/pre>\n<p>From here, convert multiple PNG files by specifying the filename with * in the command.<\/p>\n<pre>\npngquant *.png\n<\/pre>\n<p>All converted PNGs in the directory will have the \u201cFs8\u201d tag in the filename.<\/p>\n<h2>Method 2 \u2013 Trimage image compressor<\/h2>\n<p>Another great way to compress PNG Image files on Linux is the Trimage compressor. This program works well on most Linux PCs and has a friendly GUI. To get the app installed, open up a terminal window on the Linux desktop.\u00a0<\/p>\n<p>To open up a terminal window, press\u00a0<strong>Ctrl + Alt + T<\/strong> \u00a0on the keyboard. Or, alternatively, search for \u201cTerminal\u201d in the app menu and launch it that way. When the terminal window is open, follow the command-line installation instructions below that correspond to the Linux OS you use.<\/p>\n<h4>Ubuntu<\/h4>\n<p>On Ubuntu, install it with\u00a0<strong>apt install<\/strong>.<\/p>\n<pre>\nsudo apt install trimage\n<\/pre>\n<h4>Debian<\/h4>\n<p>On Debian, get the app working with\u00a0<strong>apt-get install<\/strong>.<\/p>\n<pre>\nsudo apt-get install trimage\n<\/pre>\n<h4>Arch Linux<\/h4>\n<p>On Arch Linux, install the app with\u00a0<strong>pacman<\/strong>.<\/p>\n<pre>\nwget https:\/\/userrepository.eu\/trimage-1.0.6-2-any.pkg.tar.zst\n<\/pre>\n<pre>\nsudo pacman -U trimage-1.0.6-2-any.pkg.tar.zst\n<\/pre>\n<h4>Fedora<\/h4>\n<p>On Fedora Linux, install the app with\u00a0<strong>dnf install<\/strong>.<\/p>\n<pre>\nsudo dnf install https:\/\/raw.githubusercontent.com\/rpmsphere\/noarch\/master\/t\/trimage-1.0.6-2.noarch.rpm\n<\/pre>\n<p>With the Trimage app installed, launch it on the desktop by searching for it in the app menu. When the app is open, click on the \u201cAdd and compress\u201d button. Then, browse for the PNG files you wish you compress.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404884 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-1.png\" alt=\"\" width=\"1200\" height=\"711\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-1.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-6.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-7.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-8.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>After adding the PNG files to Trimage, it will automatically start compressing. This should only take a few seconds but could take longer depending on how many files you add. When the compression is done, Trimage will overwrite the old file.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404886 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-2.png\" alt=\"\" width=\"1201\" height=\"562\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-2.png 1201w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-9.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-10.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-compress-png-files-on-linux-11.png 768w\" sizes=\"(max-width: 1201px) 100vw, 1201px\"\/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Are you looking to compress some PNG images on your Linux PC? Can\u2019t figure out how to compress PNGs? We can help! In this guide, we\u2019ll go over two great ways you can compress your PNG image files on Linux. Need to compress other image types? Check out Curtail for Linux. Method 1 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1479,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1478"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1478"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1478\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1479"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}