<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Optimize and Compress JPEG or PNG Images in Linux Commandline	</title>
	<atom:link href="https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Fri, 14 Jul 2023 03:42:43 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Stephen Ajulu		</title>
		<link>https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-1622895</link>

		<dc:creator><![CDATA[Stephen Ajulu]]></dc:creator>
		<pubDate>Wed, 27 Oct 2021 06:03:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18312#comment-1622895</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-906103&quot;&gt;Aamnah&lt;/a&gt;.

Hi, how are you? Thanks so much for this. Made a bash script to run on my site&#039;s image folder and it works well. Working on creating a cronjob for automation. Now I have a question. How can I do the same with GIFs, WEBP, and SVGs?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-906103">Aamnah</a>.</p>
<p>Hi, how are you? Thanks so much for this. Made a bash script to run on my site&#8217;s image folder and it works well. Working on creating a cronjob for automation. Now I have a question. How can I do the same with GIFs, WEBP, and SVGs?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Roman H.		</title>
		<link>https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-1340448</link>

		<dc:creator><![CDATA[Roman H.]]></dc:creator>
		<pubDate>Tue, 23 Jun 2020 11:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18312#comment-1340448</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-905881&quot;&gt;Jonathan&lt;/a&gt;.

&lt;code&gt;jpegoptim dir/**/*.jpg&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-905881">Jonathan</a>.</p>
<p><code>jpegoptim dir/**/*.jpg</code></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Euph0ria		</title>
		<link>https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-1318308</link>

		<dc:creator><![CDATA[Euph0ria]]></dc:creator>
		<pubDate>Sun, 23 Feb 2020 03:21:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18312#comment-1318308</guid>

					<description><![CDATA[Does either of these optimization tools retain metadata embedded in the image? (such as Exif, etc)]]></description>
			<content:encoded><![CDATA[<p>Does either of these optimization tools retain metadata embedded in the image? (such as Exif, etc)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: xekon		</title>
		<link>https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-1313040</link>

		<dc:creator><![CDATA[xekon]]></dc:creator>
		<pubDate>Wed, 22 Jan 2020 02:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18312#comment-1313040</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-1156454&quot;&gt;Bruce Bates&lt;/a&gt;.

I actually experienced the opposite, &lt;code&gt;optipng&lt;/code&gt; does great, if you try to use &lt;strong&gt;ffmpeg&lt;/strong&gt; the file gets 10x larger.

Take a file, for example, &lt;strong&gt;image7.png&lt;/strong&gt; and do the following:
&lt;pre&gt;
# optipng -o7 -zm1-9 -strip all image7.png -out image7-optipng.png
# ffmpeg -i image7.png image7-ffmpeg.png
# convert image7.png -define png:compression-level=9 image7-magik.png
# pngcrush image7.png image7-crush.png
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-1156454">Bruce Bates</a>.</p>
<p>I actually experienced the opposite, <code>optipng</code> does great, if you try to use <strong>ffmpeg</strong> the file gets 10x larger.</p>
<p>Take a file, for example, <strong>image7.png</strong> and do the following:</p>
<pre>
# optipng -o7 -zm1-9 -strip all image7.png -out image7-optipng.png
# ffmpeg -i image7.png image7-ffmpeg.png
# convert image7.png -define png:compression-level=9 image7-magik.png
# pngcrush image7.png image7-crush.png
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Julian		</title>
		<link>https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-1292201</link>

		<dc:creator><![CDATA[Julian]]></dc:creator>
		<pubDate>Mon, 18 Nov 2019 22:12:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18312#comment-1292201</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-906103&quot;&gt;Aamnah&lt;/a&gt;.

Hi,

this usage of `&lt;strong&gt;find&lt;/strong&gt;` in conjunction with `&lt;strong&gt;jpegoptim&lt;/strong&gt;` (and possibly also with `&lt;strong&gt;optipng&lt;/strong&gt;`) will call the `&lt;strong&gt;jpegoptim&lt;/strong&gt;` command for every file `find` matches. 

In case anyone is looking for processing all matching files in a single run, try the following:

&lt;code&gt;`find path/to/images/ -regex &quot;.*\.\(jpg\&#124;jpeg\)&quot; -exec jpegoptim {} +`&lt;/code&gt;

Note the &lt;code&gt;`+`&lt;/code&gt; at the end of the &lt;code&gt;`exec`&lt;/code&gt; command, which leads to &lt;code&gt;`exec`&lt;/code&gt; finally being called with all matching files.

Source: https://www.booleanworld.com/guide-linux-find-command/ (right above &quot;Executing commands on directories&quot;)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/comment-page-1/#comment-906103">Aamnah</a>.</p>
<p>Hi,</p>
<p>this usage of `<strong>find</strong>` in conjunction with `<strong>jpegoptim</strong>` (and possibly also with `<strong>optipng</strong>`) will call the `<strong>jpegoptim</strong>` command for every file `find` matches. </p>
<p>In case anyone is looking for processing all matching files in a single run, try the following:</p>
<p><code>`find path/to/images/ -regex ".*\.\(jpg\|jpeg\)" -exec jpegoptim {} +`</code></p>
<p>Note the <code>`+`</code> at the end of the <code>`exec`</code> command, which leads to <code>`exec`</code> finally being called with all matching files.</p>
<p>Source: <a target="_blank" href="https://www.booleanworld.com/guide-linux-find-command/" rel="nofollow ugc">https://www.booleanworld.com/guide-linux-find-command/</a> (right above &#8220;Executing commands on directories&#8221;)</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
