<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shogo Sensui</title>
    <description>The latest articles on DEV Community by Shogo Sensui (@1000ch).</description>
    <link>https://dev.to/1000ch</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F45087%2F5c0dc7da-32f7-4ec9-be9b-078820a1aae6.jpg</url>
      <title>DEV Community: Shogo Sensui</title>
      <link>https://dev.to/1000ch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/1000ch"/>
    <language>en</language>
    <item>
      <title>Optimizing your SVG files with GUI tools</title>
      <dc:creator>Shogo Sensui</dc:creator>
      <pubDate>Sat, 13 Jun 2020 05:10:55 +0000</pubDate>
      <link>https://dev.to/1000ch/optimizing-your-svg-files-with-gui-tools-1co9</link>
      <guid>https://dev.to/1000ch/optimizing-your-svg-files-with-gui-tools-1co9</guid>
      <description>&lt;p&gt;The SVG output from Sketch and other tools may contain data that are not required for display. You can also use git or other tools to do version control on SVGs, but you should remove unnecessary data before you commit them.&lt;/p&gt;

&lt;p&gt;There is a Node.js tool called &lt;a href="https://github.com/svg/svgo"&gt;svgo&lt;/a&gt;, which allows you to use an unnecessary You can apply formatting and minimization processes while removing the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The need to do it with GUI tools
&lt;/h2&gt;

&lt;p&gt;You don't have to use a GUI tool to do it, but it's an option for situations where you want to optimize a single file, or you want to use a text editor instead of a terminal, and you don't need a commit hook in git.&lt;/p&gt;

&lt;p&gt;If you have the &lt;a href="https://github.com/sketch-hq/svgo-compressor"&gt;Sketch plugin&lt;/a&gt; installed, you can get an optimized export. You can do this, so there are no leaks. Also, it's not limited to SVGs, but if it's an icon, you can adjust the size of the artboard before exporting. Align it, keep the paths outlined, and make sure the artboard name makes sense. It's a good idea to do this. By doing this, the size of the ViewBox will be unified, and unnecessary transform information will be removed from it. A meaningful name should be inserted into the &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; element.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plugins
&lt;/h2&gt;

&lt;p&gt;For Figma, see &lt;a href="https://www.figma.com/blog/with-figmas-new-svg-exports-less-more/"&gt;With Figma's new SVG Exports, less = more&lt;/a&gt;, it appears that there are no tools for this.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/1000ch/vscode-svgo"&gt;1000ch/vscode-svgo&lt;/a&gt;: Run "Install Extensions" in the command palette (&lt;code&gt;⌘&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;P&lt;/code&gt;) and search by svgo&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/1000ch/atom-svgo"&gt;1000ch/atom-svgo&lt;/a&gt;: Run &lt;code&gt;apm install svgo&lt;/code&gt; or search by svgo in "Install"&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/1000ch/Sublime-svgo"&gt;1000ch/Sublime-svgo&lt;/a&gt;: Run "Install Extensions" in the command palette (&lt;code&gt;⌘&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;P&lt;/code&gt;) and search by svgo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;VSCode and Atom have Node.js built-in, so all you have to do is install it and you're good to go! Sublime Text does not include Node.js, so you have to install it. The path to Node.js (&lt;code&gt;node&lt;/code&gt;) must be in the terminal's &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>image</category>
      <category>svg</category>
      <category>svgo</category>
    </item>
    <item>
      <title>simplehttp2server on Node.js</title>
      <dc:creator>Shogo Sensui</dc:creator>
      <pubDate>Thu, 04 Jun 2020 17:08:38 +0000</pubDate>
      <link>https://dev.to/1000ch/simplehttp2server-on-node-js-dcj</link>
      <guid>https://dev.to/1000ch/simplehttp2server-on-node-js-dcj</guid>
      <description>&lt;p&gt;There is a standard library called &lt;a href="https://docs.python.org/3/library/http.server.html"&gt;&lt;code&gt;http.server&lt;/code&gt;&lt;/a&gt; in the Python 3 series that allows you to host a directory in a local environment. It is provided as a &lt;a href="https://docs.python.org/2.7/library/simplehttpserver.html"&gt;&lt;code&gt;SimpleHTTPServer&lt;/code&gt;&lt;/a&gt; in the Python 2 series, and was useful for hosting web pages in the local environment in a simple way.&lt;/p&gt;

&lt;h2&gt;
  
  
  simplehttp2server
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;http.server&lt;/code&gt; is hosted by http/1.1, but for those who want to host it by http/2, there is one called &lt;a href="https://github.com/GoogleChromeLabs/simplehttp2server"&gt;GoogleChromeLabs/simplehttp2server&lt;/a&gt;. It is a very useful tool, but you need to install it with Homebrew or &lt;code&gt;go get&lt;/code&gt;. I developed &lt;a href="https://github.com/1000ch/simplehttp2server"&gt;1000ch/simplehttp2server&lt;/a&gt; as a Node.js wrapper for GoogleChromeLabs/simplehttp2server to make it easy to use it in Web Frontend projects.&lt;/p&gt;

&lt;p&gt;That said, it's been about 5 years since I published &lt;a href="https://www.npmjs.com/package/simplehttp2server"&gt;simplehttp2server&lt;/a&gt; in npm, so it's nothing new. A recent change was made to this Node.js wrapper and the command line package that separated it.&lt;/p&gt;

&lt;h2&gt;
  
  
  simplehttp2server-cli
&lt;/h2&gt;

&lt;p&gt;So now there are simplehttp2server and &lt;a href="https://github.com/1000ch/simplehttp2server-cli"&gt;simplehttp2server-cli&lt;/a&gt; packages wrapping binaries. In order to run simplehttp2server on the command line, you need to install the latter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; simplehttp2server-cli
&lt;span class="nv"&gt;$ &lt;/span&gt;simplehttp2server &lt;span class="nt"&gt;--help&lt;/span&gt;
  &lt;span class="nt"&gt;-config&lt;/span&gt; string
      Config file
  &lt;span class="nt"&gt;-cors&lt;/span&gt; string
      Set allowed origins &lt;span class="o"&gt;(&lt;/span&gt;default &lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="nt"&gt;-listen&lt;/span&gt; string
      Port to listen on &lt;span class="o"&gt;(&lt;/span&gt;default &lt;span class="s2"&gt;":5000"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, simplehttp2server can work, and folders in the local environment can be easily hosted with http/2. Note that since this is http/2, it will be accompanied by https, and the default port will be &lt;code&gt;https://localhost:5000&lt;/code&gt;. And &lt;a href="https://github.com/GoogleChromeLabs/simplehttp2server#that-browser-warning"&gt;Google Chrome can't open &lt;code&gt;https://localhost&lt;/code&gt; by default due to security issues&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you enable &lt;code&gt;#allow-insecure-localhost&lt;/code&gt; flag from &lt;code&gt;chrome://flags&lt;/code&gt; and restart Google Chrome, you can also open &lt;code&gt;https://localhost&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>node</category>
      <category>http2</category>
    </item>
    <item>
      <title>Simple, Light-weight and Flexible Vue.js component for grid layout</title>
      <dc:creator>Shogo Sensui</dc:creator>
      <pubDate>Thu, 25 Jul 2019 06:30:03 +0000</pubDate>
      <link>https://dev.to/1000ch/simple-light-weight-and-flexible-vue-js-component-for-grid-layout-3i20</link>
      <guid>https://dev.to/1000ch/simple-light-weight-and-flexible-vue-js-component-for-grid-layout-3i20</guid>
      <description>&lt;p&gt;Just published &lt;a href="https://github.com/1000ch/vue-grd"&gt;1000ch/vue-grd&lt;/a&gt;, Vue.js component which provides flexible grid layout system with simple usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use?
&lt;/h2&gt;

&lt;p&gt;You can install via &lt;code&gt;npm&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save&lt;/span&gt; vue-grd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After importing and registering as component, you can use &lt;code&gt;&amp;lt;vue-grid&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;vue-cell&amp;gt;&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;vue-grid&lt;/span&gt; &lt;span class="na"&gt;align=&lt;/span&gt;&lt;span class="s"&gt;"stretch"&lt;/span&gt; &lt;span class="na"&gt;justify=&lt;/span&gt;&lt;span class="s"&gt;"start"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;vue-cell&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"fill"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;fill&lt;span class="nt"&gt;&amp;lt;/vue-cell&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;vue-cell&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"3of12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;3of12&lt;span class="nt"&gt;&amp;lt;/vue-cell&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;vue-cell&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"3of12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;3of12&lt;span class="nt"&gt;&amp;lt;/vue-cell&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/vue-grid&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;VueGrid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;VueCell&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue-grd&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;VueGrid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;VueCell&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can also register them as global component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;VueGrd&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue-grd&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;VueGrd&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// or&lt;/span&gt;
&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue-grid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;VueGrd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;VueGrid&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue-cell&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;VueGrd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;VueCell&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you don't use &lt;code&gt;npm&lt;/code&gt;, you can load via jsDelivr.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/vue-grd@1.1.0/dist/vue-grd.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;VueGrd&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Configure
&lt;/h2&gt;

&lt;p&gt;They have some properties to align and justify set width.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;&amp;lt;vue-grid align&amp;gt;&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;top: Pull items to top&lt;/li&gt;
&lt;li&gt;middle: Pull items to middle&lt;/li&gt;
&lt;li&gt;bottom: Pull items to bottom&lt;/li&gt;
&lt;li&gt;stretch: Stretch items&lt;/li&gt;
&lt;li&gt;baseline: Pull items to baseline&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;&amp;lt;vue-grid justify&amp;gt;&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;start: Layout items to start&lt;/li&gt;
&lt;li&gt;center: Layout items to center&lt;/li&gt;
&lt;li&gt;end: Layout items to end&lt;/li&gt;
&lt;li&gt;between: Add spaces between items&lt;/li&gt;
&lt;li&gt;around: Add spaces around items&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;&amp;lt;vue-cell width&amp;gt;&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;fill: Set item width to left&lt;/li&gt;
&lt;li&gt;1of12: Set item width to 8.3%&lt;/li&gt;
&lt;li&gt;2of12: Set item width to 16.7%&lt;/li&gt;
&lt;li&gt;3of12: Set item width to 25%&lt;/li&gt;
&lt;li&gt;4of12: Set item width to 33%&lt;/li&gt;
&lt;li&gt;5of12: Set item width to 41.7%&lt;/li&gt;
&lt;li&gt;6of12: Set item width to 50%&lt;/li&gt;
&lt;li&gt;7of12: Set item width to 58.3%&lt;/li&gt;
&lt;li&gt;8of12: Set item width to 66.7%&lt;/li&gt;
&lt;li&gt;9of12: Set item width to 75%&lt;/li&gt;
&lt;li&gt;10of12: Set item width to 83.3%&lt;/li&gt;
&lt;li&gt;11of12: Set item width to 91.7%&lt;/li&gt;
&lt;li&gt;12of12: Set item width to 100%&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Live Demo
&lt;/h2&gt;

&lt;p&gt;You can try it from &lt;a href="https://1000ch.github.io/vue-grd/"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vue</category>
    </item>
    <item>
      <title>We should optimize images</title>
      <dc:creator>Shogo Sensui</dc:creator>
      <pubDate>Mon, 17 Jun 2019 18:36:33 +0000</pubDate>
      <link>https://dev.to/1000ch/we-should-optimize-images-5ab6</link>
      <guid>https://dev.to/1000ch/we-should-optimize-images-5ab6</guid>
      <description>&lt;p&gt;Steve Souders said on &lt;a href="http://stevesouders.com/hpws/"&gt;High Performance Web Site&lt;/a&gt;,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;80-90% of the end-user response time is spent on the frontend. Start there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Web performance mostly depends on the frontend. It means to make the web faster; we have to optimize the frontend. For example, it contains the following factors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimize &lt;a href="https://developers.google.com/speed/docs/insights/mobile"&gt;round trip times&lt;/a&gt; and &lt;a href="https://developers.google.com/speed/docs/insights/EnableCompression"&gt;request overhead&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Minimize &lt;a href="https://developers.google.com/speed/docs/insights/PrioritizeVisibleContent"&gt;payload size&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/speed/docs/insights/PrioritizeVisibleContent"&gt;Optimize browser rendering&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;And others…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Minimizing payload size is one of the easiest to apply. To reduce the number and payload size, we have to minimize HTML, CSS, and image files. Notably, the file size of images takes the most bandwidth in most cases. So I will introduce you to some tools for image optimization.&lt;/p&gt;

&lt;h2&gt;
  
  
  GUI Tools for image optimization
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://imageoptim.com/mac"&gt;ImageOptim&lt;/a&gt; — image optimizer which contains PNGOUT, Zopfli, Pngcrush, AdvPNG, extended OptiPNG, JpegOptim, jpegrescan, jpegtran, and Gifsicle.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pngmini.com/"&gt;ImageAlpha&lt;/a&gt; — reduce file sizes of 24bit PNGs by converting them to 8bit.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://webponize.org"&gt;WebPonize&lt;/a&gt; — a Mac OS App for converting images into WebP.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://jakearchibald.github.io/svgomg/"&gt;SVGOMG&lt;/a&gt; - SVGO's Missing GUI.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://squoosh.app/"&gt;Squoosh&lt;/a&gt; - Compress and compare images with different codecs, right in your browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Image comparison
&lt;/h2&gt;

&lt;p&gt;They are GUI applications, so you can use them to apply compression to your images easily. Here is the sample result of PNG image compression:&lt;/p&gt;

&lt;h3&gt;
  
  
  Uncompressed PNG (71,834bytes)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m-Jg4FXM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/v70syevstzvjx4spj9df.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m-Jg4FXM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/v70syevstzvjx4spj9df.png" alt="Uncompressed PNG (71,834bytes)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is original PNG image without compression. This image is 24bit oriented and contains lots of meta such as location, date, and time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compressed PNG (28,369 bytes) with ImageAlpha &amp;amp; ImageOptim
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VxlO55tO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/gut0mn3w56fq49bict0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VxlO55tO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/gut0mn3w56fq49bict0x.png" alt="Compressed PNG (28,369 bytes) with ImageAlpha &amp;amp; ImageOptim"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the 8bit-converted PNG compressed with ImageAlpha and ImageOptim. It looks not degraded.&lt;/p&gt;

&lt;h3&gt;
  
  
  Optimized JPEG (213171 bytes) with ImageOptim. Meta is removed. But lossy-compression is not applied.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_Zib85E3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/27m3rb7refxeb2olg1fx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_Zib85E3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/27m3rb7refxeb2olg1fx.jpeg" alt="Optimized JPEG (213171 bytes) with ImageOptim. Meta is removed. But lossy-compression is not applied"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As other example, this one is a JPEG. Meta is removed with ImageOptim and lossy-compression is not applied.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compressed JPEG (71874 bytes) with JPEGmini &amp;amp; ImageOptim
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1CgETeKs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/a6gvgpe6hp3t0oemmas4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1CgETeKs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/a6gvgpe6hp3t0oemmas4.jpeg" alt="Compressed JPEG (71874 bytes) with JPEGmini &amp;amp; ImageOptim"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This one is compressed with JPEGmini. It does not look too degraded, and the file size is about 34% of the original (66% cut!!!). Photos that contain many colors will be degraded, so we have to check the image after compression. It is a little annoying, but it’s worth it.&lt;/p&gt;

&lt;h2&gt;
  
  
  CUI Tools for image optimization
&lt;/h2&gt;

&lt;p&gt;I also wanted the CLI tool, so I created the tool as grunt task and gulp one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/1000ch/grunt-image"&gt;grunt-image&lt;/a&gt; — Optimizes PNG, JPEG, GIF images without GUI.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/1000ch/grunt-image"&gt;gulp-image&lt;/a&gt; — Gulp one of above.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can optimize PNG, JPEG, GIF images using them. Installation? It’s simple and easy if you have used Grunt or Gulp. (I guess you have already used them☺)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# download them using npm&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; —-save-dev grunt-image
&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; —-save-dev gulp-image
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Detailed settings are on the projects’ GitHub repositories.&lt;/p&gt;

&lt;h2&gt;
  
  
  WebP is a new image format by Google
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/speed/webp/"&gt;WebP&lt;/a&gt; is also awesome. This is a new image format by Google. It says,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;WebP lossless images are &lt;a href="https://developers.google.com/speed/webp/docs/webp_lossless_alpha_study#results"&gt;26% smaller&lt;/a&gt; in size compared to PNGs. WebP lossy images are &lt;a href="https://developers.google.com/speed/webp/docs/webp_study"&gt;25-34% smaller&lt;/a&gt; in size compared to JPEG images at equivalent SSIM index.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;WebP is supported by Chrome and other browsers which contain &lt;a href="https://dev.chromium.org/developers/how-tos/chrome-frame-getting-started"&gt;Chrome Frame&lt;/a&gt;. Safari does not currently support WebP. But interestingly, Chrome on iOS is able to display WebP images (It seems to have Chrome Frame)!&lt;/p&gt;

&lt;p&gt;WebP is available from &lt;a href="https://developers.google.com/speed/webp/"&gt;here&lt;/a&gt;. I want to show you WebP image, but it is not available on Medium sadly. However, in my test, the PNG file size before converting into WebP is &lt;strong&gt;28,369 bytes&lt;/strong&gt;. After converting, the file size of WebP one is &lt;strong&gt;17,382 bytes&lt;/strong&gt;, and it looks not degraded Yay!&lt;/p&gt;




&lt;p&gt;If you have ever not taken care of image optimization, you should apply optimization for better web performance. Finally, I recommend the following articles to learn more about the image:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.phpied.com/give-png-a-chance/"&gt;Give PNG a chance&lt;/a&gt; — by &lt;a href="http://www.phpied.com/bio/"&gt;Stoyan Stefanov&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://calendar.perfplanet.com/2013/mobile-isp-image-recompression/"&gt;Mobile ISP image recompression&lt;/a&gt; — by &lt;a href="https://kornel.ski/"&gt;Kornel Lesiński&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sitepoint.com/png8-the-clear-winner/"&gt;PNG8 — The Clear Winner&lt;/a&gt; — by &lt;a href="https://www.sitepoint.com/author/alex-walker/"&gt;Alex Walker&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://calendar.perfplanet.com/2010/png-that-works/"&gt;PNG that works&lt;/a&gt; — by &lt;a href="https://kornel.ski/"&gt;Kornel Lesiński&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.html5rocks.com/en/tutorials/speed/img-compression/"&gt;Image Compression for Web Developers&lt;/a&gt; — by &lt;a href="https://www.html5rocks.com/en/profiles/#coltmcanlis"&gt;Colt McAnlis&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://medium.com/@1000ch/introduction-to-webp-b593dfe1d1d1"&gt;Introduction to WebP&lt;/a&gt; — by Me&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>image</category>
    </item>
  </channel>
</rss>
