<?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: yosi</title>
    <description>The latest articles on DEV Community by yosi (@yosipy).</description>
    <link>https://dev.to/yosipy</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%2F1858089%2F0a4a93d2-e5f9-4c25-b512-a7caf500c897.jpg</url>
      <title>DEV Community: yosi</title>
      <link>https://dev.to/yosipy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yosipy"/>
    <language>en</language>
    <item>
      <title>Developed an image compression site to fight pandas.</title>
      <dc:creator>yosi</dc:creator>
      <pubDate>Mon, 29 Jul 2024 19:32:31 +0000</pubDate>
      <link>https://dev.to/yosipy/the-story-of-the-development-of-an-image-compression-site-that-fights-pandas-4i84</link>
      <guid>https://dev.to/yosipy/the-story-of-the-development-of-an-image-compression-site-that-fights-pandas-4i84</guid>
      <description>&lt;p&gt;We released another new service on July 25, so I will talk about it this time.&lt;br&gt;
By the way, I started development around the 22nd, so I made it in about 3 days.&lt;/p&gt;

&lt;h2&gt;
  
  
  About the service I created
&lt;/h2&gt;

&lt;p&gt;The "ImgRoller" is a site that compresses and resizes images.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://yosidev.com/tools/imgroller/en/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzooskwbvdx0hg8kldu8r.png" alt="ImgRoller" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://yosidev.com/tools/imgroller/en/" rel="noopener noreferrer"&gt;https://yosidev.com/tools/imgroller/en/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is an image compression &amp;amp; resizing web application with the following features when briefly introduced.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🆓Free to use and no limit on the number of sheets you can compress at once&lt;/li&gt;
&lt;li&gt;🍎Powerful compression performance&lt;/li&gt;
&lt;li&gt;📜Not only compression but also resizing. Also provides intuitive comparison of image quality&lt;/li&gt;
&lt;li&gt;📌Output settings are reflected in the URL, so you can bookmark it and use the same settings next time&lt;/li&gt;
&lt;li&gt;✨Output supports Webp as well as PNG and Jpeg&lt;/li&gt;
&lt;li&gt;👀File size reduction at a glance&lt;/li&gt;
&lt;li&gt;💕No need to worry because no files are uploaded to the server&lt;/li&gt;
&lt;li&gt;📗Supports 8 languages including Japanese and English&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Points
&lt;/h2&gt;

&lt;p&gt;We insisted that image processing be completed browser-side. There is a reason for this: it was necessary to lower infrastructure costs so that we could offer free and unlimited use.&lt;/p&gt;

&lt;p&gt;Basically, we use &lt;a href="https://github.com/fengyuanchen/compressorjs" rel="noopener noreferrer"&gt;Compressor.js&lt;/a&gt;, but we also compress PNGs, which compressorjs is not good at.&lt;/p&gt;

&lt;p&gt;If you enter an appropriate PNG image in &lt;a href="https://fengyuanchen.github.io/compressorjs/" rel="noopener noreferrer"&gt;Compressor.js sample site&lt;/a&gt;, you will see that the size does not change.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi10b0hhy1kwsqegkm9nk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi10b0hhy1kwsqegkm9nk.png" alt="Example of compression with compressorjs" width="749" height="687"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next, enter the same image into &lt;a href="https://yosidev.com/tools/imgroller/en/" rel="noopener noreferrer"&gt;ImgRoller&lt;/a&gt;. The result is compressed to less than half the size.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidc912x73lrar3gg01x4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidc912x73lrar3gg01x4.png" alt="Example of compression with ImgRoller" width="780" height="570"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For PNG images, this is achieved by separately reducing the number of colors to 256 and performing lossy compression processing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dropzone on React
&lt;/h2&gt;

&lt;p&gt;ImgRoller has a Doropzone that allows you to drag and drop files to select files. And I think the most famous way to create it in React is to use the package &lt;a href="https://react-dropzone.js.org/" rel="noopener noreferrer"&gt;react-dropzone&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I myself was a frequent user of this package, but when I went to Github after a long time, I realized that it had been almost two years since the last commit. Since I couldn't find any other good options, I was torn between using react-dropzone or creating my own, and finally decided to create my own.&lt;/p&gt;

&lt;p&gt;I am releasing it as a package under the name react-dropzone-vv.&lt;br&gt;
I have also created a documentation site. I'm doing my best to update it, so please use it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/yosipy/react-dropzone-vv" rel="noopener noreferrer"&gt;https://github.com/yosipy/react-dropzone-vv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/react-dropzone-vv#react-dropzone-vv" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/react-dropzone-vv#react-dropzone-vv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is influenced by react-dropzone, but I did not divert the code but rebuilt it from scratch.&lt;br&gt;
It was surprisingly troublesome to check the mime type and file extension of the files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finally.
&lt;/h2&gt;

&lt;p&gt;It is useful when you want to compress a little.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://yosidev.com/tools/imgroller/en/" rel="noopener noreferrer"&gt;https://yosidev.com/tools/imgroller/en/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00n9rmik8sohxkpccdze.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00n9rmik8sohxkpccdze.jpeg" alt="Rough Image of ImgRoller icon" width="800" height="599"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
    </item>
  </channel>
</rss>
