<?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: PerfReviews ⚡️</title>
    <description>The latest articles on DEV Community by PerfReviews ⚡️ (@perfreviews).</description>
    <link>https://dev.to/perfreviews</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%2F237889%2Fbe6e132c-fddf-4705-91f0-68ba109be206.png</url>
      <title>DEV Community: PerfReviews ⚡️</title>
      <link>https://dev.to/perfreviews</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/perfreviews"/>
    <language>en</language>
    <item>
      <title>How to Estimate Web Performance Impact Before Making Fixes</title>
      <dc:creator>PerfReviews ⚡️</dc:creator>
      <pubDate>Sun, 24 May 2020 22:26:49 +0000</pubDate>
      <link>https://dev.to/perfreviews/how-to-estimate-web-performance-impact-before-making-fixes-283</link>
      <guid>https://dev.to/perfreviews/how-to-estimate-web-performance-impact-before-making-fixes-283</guid>
      <description>&lt;p&gt;&lt;small&gt;&lt;i&gt;This post was first published on &lt;a href="https://jmperezperez.com/assess-performance-impact/"&gt;José M. Pérez's blog&lt;/a&gt;.&lt;/i&gt;&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Web Performance is important for user experience and business metrics. Estimating its impact is key to be able to prioritize it, yet it's difficult to quantify its benefits until the work has been done.&lt;/p&gt;

&lt;p&gt;We need to break this chicken-and-egg loop. This post explains several ways of assessing the potential performance gains with little effort and, more importantly, without actually implementing fixes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the business opportunity for web performance improvements?
&lt;/h2&gt;

&lt;p&gt;In the past I have been too naive thinking that every stakeholder would care as much as I do about web performance. &lt;em&gt;"Look, there are many case studies proving a correlation between loading time and business metrics!"&lt;/em&gt; - I would repeat over and over. Previous results from other companies or websites, like &lt;a href="https://wpostats.com/"&gt;those published on WPO Stats&lt;/a&gt;, are essential to start a conversation about the topic, but it's not sufficient. &lt;strong&gt;How will that apply to my business?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I thought that the best way to prove the value would be to &lt;a href="https://web.dev/measure"&gt;audit performance using Lighthouse&lt;/a&gt;, fix the issue with lowest effort/highest impact, and measure. This can work if the audit shows potential improvements and the stakeholders agree to dedicate time and people to run the initial experiment.&lt;/p&gt;

&lt;p&gt;However, more often than not &lt;strong&gt;performance audits are not enough to move the needle&lt;/strong&gt;. Yes, you can get an estimation of potential time savings, but can't be translated directly into conversions or revenue, which are the metrics that the business cares about.&lt;/p&gt;

&lt;p&gt;During last months I have come across these low effort techniques to size the opportunity for web performance improvements linking performance metrics to business metrics:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plotting Business Metrics vs Performance Metrics&lt;/strong&gt;: How to track both performance metrics and business metrics and establish correlations between them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Measuring the Relative Mobile Conversion Rate&lt;/strong&gt;: Identify performance issues by comparing the conversion rates on mobile and desktop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Using Test My Site from Think with Google&lt;/strong&gt;: Gives you an estimation of potential revenue increase for your site when saving loading time.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Plotting Business Metrics vs Performance Metrics
&lt;/h2&gt;

&lt;p&gt;Think about what you are trying to drive on your existing site. Is it newsletter registrations? Leads? Purchases? When a user performs those actions, the user has converted. It's important to track these conversion events, and you can do it in your own system or leveraging tools like Google Analytics or Facebook Analytics.&lt;/p&gt;

&lt;p&gt;Now the question is: &lt;strong&gt;how does user experience affect conversion rate?&lt;/strong&gt; Assuming there are enough conversions, it is possible to cluster these conversions based on a performance metric. This is exactly what &lt;a href="https://twitter.com/cpclermont"&gt;CP Clermont&lt;/a&gt; did at ALDO and &lt;a href="https://simplified.dev/performance/impact-of-web-performance"&gt;described in his post "The Impact of Web Performance"&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The idea is that &lt;strong&gt;if we can prove that users having a better web performance are converting more often, we can measure the impact of improving user's experience in money terms&lt;/strong&gt;. The best thing is that the effort is relatively low:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Track the conversion event, which you might be doing already&lt;/li&gt;
&lt;li&gt;Add an event with a performance metric category. CP Clermont chose First Paint, Time to Interactive, Time to App Load (a custom metric for ALDO's SPA), and Frames per Second. Then, he translated the metrics into 3 categories (good, average, and poor) and logged a custom dimension on Google Analytics.&lt;/li&gt;
&lt;li&gt;Plot business metrics vs performance metrics over time. For business metrics CP Clermont chose Conversion Rate and Revenue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uLXUi7uz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/uxgaapozmehwfzj9xczg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uLXUi7uz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/uxgaapozmehwfzj9xczg.png" alt="Plotting Conversion Rate for each First Paint Category (good, average, slow)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One could wonder if users having a better performance and spending more because they are using better devices (ie the latest iPhone), which have better CPUs and their users have likely a higher purchase power.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_Pqz9n3J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/x4lhcv2kidl5yzbkkiqe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_Pqz9n3J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/x4lhcv2kidl5yzbkkiqe.png" alt="Plotting Revenue per session for a specific device (iPhone 8) depending on FPS after click"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using Google Analytics you can see what type of device the user is using and plot results by specific models to get an answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.Measuring the Relative Mobile Conversion Rate
&lt;/h2&gt;

&lt;p&gt;Another easy way to spot performance issues and making a business case is to look at conversation rates. This is &lt;a href="https://www.blog.google/products/marketingplatform/analytics/mobile-challenge-and-how-measure-it/"&gt;what Google calls Relative Mobile Conversion Rate (Rel mCvR)&lt;/a&gt;, which is calculated by dividing the mobile conversion rate with the desktop conversion rate.&lt;/p&gt;

&lt;p&gt;Take this example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;th&gt;Mobile&lt;/th&gt;
        &lt;th&gt;Desktop&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;th&gt;Conversion rate&lt;/th&gt;
        &lt;td&gt;1.79%&lt;/td&gt;
        &lt;td&gt;4.44%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;th&gt;Rel mCvR&lt;/th&gt;
        &lt;td colspan="2"&gt;1.79% / 4.44% = 40%&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In this case the Rel mCvR is 40%.&lt;/p&gt;

&lt;p&gt;Google says that &lt;strong&gt;a good target for Rel mCvR is 70%&lt;/strong&gt;, meaning that mobile conversion rates are 30% lower than desktop. The reason why Rel mCvR can be a good metric is that it is not influenced by changes in traffic (eg seasonality or promotional campaigns). The following diagram explains it in more detail (&lt;a href="https://www.blog.google/products/marketingplatform/analytics/mobile-challenge-and-how-measure-it/"&gt;source&lt;/a&gt;):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ntMTB8Li--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/jgfqapkdsnxhh0gioaid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ntMTB8Li--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/jgfqapkdsnxhh0gioaid.png" alt="Explanation of Relative mobile conversion rate and its components"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that Rel mCvR is influenced by UX too, since a bad UX on mobile will hurt mobile conversion rates. &lt;strong&gt;You should use &lt;a href="https://web.dev/measure"&gt;Lighthouse&lt;/a&gt; or &lt;a href="https://www.webpagetest.org/"&gt;WebPageTest&lt;/a&gt; to ensure that there are performance issues and speed is the main contributor in Rel mCvR, and not usability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The key question is: &lt;em&gt;what's the target Rel mCvR?&lt;/em&gt; If we knew it we could assess the revenue that an increase in conversion rates would represent. For this we can use a similar approach to the first technique we described, clustering conversion rates based on performance metrics and calculating how many user could be "upgraded" to the following cluster (eg from slow to average experience and from average to fast).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rel mCvR can also be used to calculate the incremental revenue achieved after making a performance fix&lt;/strong&gt;. Measure what was the average Rel mCvR before and after the fix, and calculate what the revenue would have been if Rel mCvR hadn't changed.&lt;br&gt;
On &lt;a href="https://web.dev/value-of-speed/"&gt;their post "Value of Speed"&lt;/a&gt; you can find more information about the methodology and framework to measure the revenue impact.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Using Test My Site from Think with Google
&lt;/h2&gt;

&lt;p&gt;Google has &lt;a href="https://www.thinkwithgoogle.com/feature/testmysite/"&gt;a handy microsite called Test My Site&lt;/a&gt; that gives you a snapshot about your site and calculates the potential increase in revenue when improving your site speed. I would describe as a "Lighthouse report for business people".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4sPrahhK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/gldfjmrfygzdcceg9m3g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4sPrahhK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/gldfjmrfygzdcceg9m3g.png" alt="Screenshot of Google's Test My Site page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To calculate the potential increase in revenue you only need to provide your average monthly visitors, conversion rate, and average order value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sXANanHA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/pgl4xvwdaxnprrchn9nl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sXANanHA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1590358956/blog/dev.to/How-to-Estimate-Web-Performance-Impact-Before-Making-Fixes/pgl4xvwdaxnprrchn9nl.png" alt="Calculating potential increase in annual revenue using Google's Test My Site"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Behind the scenes it is powered by data from the Chrome User Experience report database or HTTP Archive, which contains performance metrics gathered from real users that have visited your site (if you are interested in this data I recommend checking &lt;a href="https://crux.run/"&gt;CRUX.RUN&lt;/a&gt;). It also uses Lighthouse to calculate the potential savings in loading time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Always complement your performance audits with assessment of expected revenue to understand the expected impact of the changes.&lt;/p&gt;

</description>
      <category>webperf</category>
      <category>performance</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Where do I start to optimize my images?</title>
      <dc:creator>PerfReviews ⚡️</dc:creator>
      <pubDate>Sat, 12 Oct 2019 06:59:56 +0000</pubDate>
      <link>https://dev.to/perfreviews/where-do-i-start-to-optimize-my-images-1f6p</link>
      <guid>https://dev.to/perfreviews/where-do-i-start-to-optimize-my-images-1f6p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;As web development professionals, we care about choosing the best framework, the most current library, applying good practices in Javascript and CSS, being careful of the semantics in HTML to improve SEO, we are improving the accessibility of our content, we package and we divide the files to optimize the load... But what about images?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Images on the web
&lt;/h2&gt;

&lt;p&gt;Images are a very important part of the web. Surely with the constant advance of technology and improvemenets in connectivity, in the future the content might be more video-based than image-based. No matter what, our goal of improving user's experience will remain. After all, that's what our work really is about.&lt;/p&gt;

&lt;p&gt;According to &lt;a href="http://httparchive.org/"&gt;HTTP Archive&lt;/a&gt;, 50% of the data transferred to load a web page are images (JPEG, PNG and GIF). In August 2019, images on mobile represented 911KB of the content loaded for the average 1.8MB site, and on desktop there were 1MB of images on an average site weighting 2MB.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/dougsillars/status/1178955502212063232"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--24mqR6aZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863169/blog/zqng15zpkog13r3rsosg.png" alt="HTTP Archive: Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;del&gt;Image Optimization&lt;/del&gt; Image eXperience is everyone's business
&lt;/h2&gt;

&lt;p&gt;A few days ago, in the article &lt;a href="https://octuweb.com/performance-web-en-tiempos-modernos/"&gt;Performance Web in modern times&lt;/a&gt;, Michelangelo wrote about a situation where he had problems planning an activity for the weekend: &lt;em&gt;"Where I should see the movie schedules, it renders white on white. I think it is loading, I am not sure ... the train has arrived and my mobile goes to the pocket. I will try later using another cinema's website..."&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;It is very likely that the white text of the schedules is set as an overlay of a fantastic and incredible image of a key scene of the last film premiere, perfectly contrasted, perfectly framed to draw the attention of the viewer and show the schedules to watch that great movie ... &lt;strong&gt;but&lt;/strong&gt;, the image has not been loaded.&lt;/p&gt;

&lt;p&gt;Let me introduce the term IX, short for Image eXperience. There are several points to consider for a good IX, beyond passing the images through a compressor that promises to optimize our images in the most effective way.&lt;/p&gt;

&lt;p&gt;In the development of a website there are several roles, whether in teams, people or someone who exercises more than one of those roles: product, UX, design, development, QA, up to &lt;a href="https://en.wikipedia.org/wiki/DevOps"&gt;DevOps&lt;/a&gt; (or what is now known as &lt;a href="https://landing.google.com/sre/"&gt;SRE&lt;/a&gt;) in the deployment phase. Each of these roles has the responsibility of offering the best for the &lt;strong&gt;user&lt;/strong&gt;, providing the maximum value to the product, taking care of the details.&lt;/p&gt;

&lt;p&gt;Let's continue with the example of the cinema schedule page that Michelangelo could not see. Given this situation, these are the questions that I ask myself and that could have been used as a checklist in the process of ideation, design, development and deployment of that page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is an image really necessary to offer that information?&lt;/li&gt;
&lt;li&gt;If white text has been chosen in order to keep a high contrast with the background image, why has a background color not been set in case the image is not displayed?&lt;/li&gt;
&lt;li&gt;Is that image optimized for mobile devices?&lt;/li&gt;
&lt;li&gt;If it is an image in JPEG format, why is it not a progressive JPEG, so IX is improved?&lt;/li&gt;
&lt;li&gt;If it is a critical image to highlight the product &lt;em&gt;(in this case it makes perfect sense)&lt;/em&gt;, why has the preload of that image not been taken into account?&lt;/li&gt;
&lt;li&gt;Has a &lt;a href="https://addyosmani.com/blog/performance-budgets/"&gt;budget&lt;/a&gt; not been defined for the images?&lt;/li&gt;
&lt;li&gt;Has anyone tested using different connection speeds?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see, the optimization of images for the web is not only about choose the percentage of compression when saving an image. There are many things to consider and many people that can intervene and detect a possible failure in a part of the product as critical as the example above.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Explaining all these points in depth would be enough content for a wholee book... Actually, I am already working on it 🤪&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;del&gt;Optimization&lt;/del&gt; Adventure Time
&lt;/h2&gt;

&lt;p&gt;Given that we want to show images on our site, the most common question is "&lt;strong&gt;where do I start to optimize my images?&lt;/strong&gt;".&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimization from graphic editors
&lt;/h2&gt;

&lt;p&gt;Graphic editors are first in line when talking about optimization. Software like &lt;a href="//httpsd://www.adobe.com/Photoshop"&gt;Photoshop&lt;/a&gt;, &lt;a href="https://affinity.serif.com/en-gb/photo/"&gt;Affinity Photo&lt;/a&gt;, &lt;a href="https://www.pixelmator.com/pro/"&gt;Pixelmator&lt;/a&gt;, &lt;a href="https://www.paintshoppro.com/"&gt;PaintShopPro&lt;/a&gt;, &lt;a href="https://www.getpaint.net/"&gt;Paint.net&lt;/a&gt; or &lt;a href="https://www.gimp.org/"&gt;GIMP&lt;/a&gt; among others. Let's not forget &lt;a href="https://www.sketch.com/"&gt;Sketch&lt;/a&gt;, which despite not focused on image editing, it is widely used to create user interfaces&lt;sup&gt;(1)&lt;/sup&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Photoshop
&lt;/h3&gt;

&lt;p&gt;It is the most used image editor by design teams. Interestingly it is &lt;strong&gt;not&lt;/strong&gt; the one that offers more optimization options. In its latest version, CC 2019 features an export dialog window with some improvements to generate images of various densities, as can be seen in the left column, but it does not leave us much choice regarding the image format and configuration parameters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G5U0O-Mn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863169/blog/duzbi61vtlh2ptbjeuw8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G5U0O-Mn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863169/blog/duzbi61vtlh2ptbjeuw8.png" alt="Photoshop: Export dialog"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can export to PNG, JPG, GIF and SVG (yes, SVG, generates an SVG file with the image embedded using base64)_. Beyond the quality percentage&lt;sup&gt;(2)&lt;/sup&gt; we don't have many configuration parameters to export the images. WebP is not supported.&lt;/p&gt;

&lt;p&gt;In previous versions of Photoshop (and in recent ones under the name "Save the Web ... (legacy)"), we can select from some predefined configurations, always according to the criteria of the Adobe team. One of the parameters that I miss in Photoshop is &lt;a href="https://en.wikipedia.org/wiki/Chroma_subsampling"&gt;Chroma Subsampling&lt;/a&gt;&lt;sup&gt;(3)&lt;/sup&gt; through which we could better optimize the optimization according our criteria. Instead they maintain a subsampling of 4:4:4 (1x1) between the values ​​51% to 100% of the quality percentage and below 51% apply a subsampling of 4:2:0 (2x2). That is why you can see a remarkable change between an image exported at 51% and the same image at 50%.&lt;/p&gt;

&lt;h3&gt;
  
  
  Affinity Photo
&lt;/h3&gt;

&lt;p&gt;Affinity Photo is another image editor that is gaining traction among the design community. So let's see what it offers us for exporting images.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JMlUxtTY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863161/blog/g8omecl1oznztkqdikyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JMlUxtTY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863161/blog/g8omecl1oznztkqdikyv.png" alt="Affinity Photo: Export dialog"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see that in the export dialog they feature more formats to select from&lt;sup&gt;(4)&lt;/sup&gt;, but let's not fool ourselves. From those, we have PNG, JPEG, GIF and SVG that are supported on web browsers. Like Photoshop, it keeps a simple setting to choose the compression level with a slide bar to select values ​​between 1% and 100%.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pixelmator
&lt;/h3&gt;

&lt;p&gt;Pixelmator is a very interesting and economical alternative for image editing. It has the same setting for choosing the compression level as the previous editors, but we can see that they have added the WebP format as an option to improve the optimization of our images. With WebP we can also select the quality percentage&lt;sup&gt;(5)&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S6j0qyLr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863169/blog/otffnwk9kpjtzzya3uub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S6j0qyLr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863169/blog/otffnwk9kpjtzzya3uub.png" alt="Pixelmator: Export dialog"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  GIMP
&lt;/h3&gt;

&lt;p&gt;GIMP might possibly be the least used tool in the world of design. It is an Open Source tool, with a large community behind it, and that can be seen in the many configuration parameters that we have available in the advanced options when exporting an image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eW1zuZ2j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/hlxc7eyvs9oiwqb4pq0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eW1zuZ2j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/hlxc7eyvs9oiwqb4pq0p.png" alt="GIMP: Export dialog"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can configure more advanced parameters such as smoothing, restart markers, subsampling or DCT method&lt;sup&gt;(6)&lt;/sup&gt;. They are configuration parameters that can put us away, and even make us spend a lot of time testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other editors
&lt;/h3&gt;

&lt;p&gt;There are many editors and we cannot analyze them all. Most follow the same approach of showing a value scale to choose the quality loss, with some editors supporting WebP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimization from applications
&lt;/h2&gt;

&lt;p&gt;In the previous section we have analyzed the tools that are usually used by design teams for image editing. A way to go beyond in optimization is using a dedicated desktop application for this goal.&lt;/p&gt;

&lt;p&gt;Wait, we have said that &lt;strong&gt;IX is everyone's business&lt;/strong&gt;. Thus, here we will show tools that all roles involved in the development of a product can use. Let's dig into some of these.&lt;/p&gt;

&lt;p&gt;If you are in a Mac environment, the best option (IMHO) is &lt;a href="https://imageoptim.com/"&gt;ImageOptim&lt;/a&gt;&lt;sup&gt;(7)&lt;/sup&gt; by &lt;a href="https://twitter.com/kornelski"&gt;Kornel Lesiński&lt;/a&gt; and it's also free.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BQ2Cj25c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/ebs249eagztrkykroce4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BQ2Cj25c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/ebs249eagztrkykroce4.png" alt="ImageOptim"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Like most desktop applications in Mac environments, one of the features that makes it stand out is a simple appearance, yet very powerful and professional.&lt;/p&gt;

&lt;p&gt;By simply dragging an image, a group of them or a folder, the application starts working, optimizing all the images. Keep in mind that what you do is replace the original image with the optimized one. That is a topic that I would like to comment on, but we will see it in the next section.&lt;/p&gt;

&lt;p&gt;The default setting offers a compression of the images &lt;strong&gt;without loss&lt;/strong&gt;, that means we won't see any visual changes, but we will reduce the size. We have the option to check the &lt;strong&gt;Enable loss and minification&lt;/strong&gt; checkbox to select quality percentages for optimization with quality loss.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--diU9AVmR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/i3paakfmytd0hqq9jy5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--diU9AVmR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/i3paakfmytd0hqq9jy5s.png" alt="ImageOptim: Quality"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the things I like most about ImageOptim is that behind its simplicity it hides a list of compressors&lt;sup&gt;(8)&lt;/sup&gt; to get the best results in each case. It goes through each of the compressors that we have marked in the list on each of the images and picks the image with the best result. That process takes a while, but I can assure you it is worth it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DZAz6yEs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/d92pnpa2zbbatnpo0yfb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DZAz6yEs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/d92pnpa2zbbatnpo0yfb.png" alt="ImageOptim: Compressors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are alternatives to ImageOptim for Windows and Linux as we can see on their own &lt;a href="https://imageoptim.com/versions"&gt;web&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I leave you reference of other applications (for Mac) that you can try. Many of them are not free, but have trial versions for a few days.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gt7lVzoH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/grmert5z4wbo6wh6rmtj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gt7lVzoH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/grmert5z4wbo6wh6rmtj.png" alt="Image Optimization Apps"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of these alternatives, the one I like is &lt;a href="https://optimage.app/"&gt;Optimage&lt;/a&gt;. On their web they promise it is more effective&lt;sup&gt;(9)&lt;/sup&gt; that &lt;strong&gt;ImageOptim&lt;/strong&gt;. It is a more complete application, since it allows us to change the image format, change its dimensions, we can configure the output folder and add prefix/suffix to not overwrite the original images. &lt;a href="https://www.jpegmini.com/"&gt;JPEGmini Pro&lt;/a&gt; is very focused on the world of photography, and really achieves very impressive results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimization from CLI tools in local
&lt;/h2&gt;

&lt;p&gt;We also have interesting options for more tech-savvy people who want to control the configuration based on parameters and automate the optimization of images. We can install and configure the native compressors&lt;sup&gt;(10)&lt;/sup&gt;, the vast majority in C, as is the case of &lt;a href="https://github.com/mozilla/mozjpeg/blob/master/BUILDING.md"&gt;MozJPEG&lt;/a&gt; or &lt;a href="https://developers.google.com/speed/webp/docs/precompiled"&gt;WebP&lt;/a&gt;&lt;em&gt;(here we have it precompiled)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zyglK_Wv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/vdk5ngg2xhqrgv5c7ipm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zyglK_Wv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/vdk5ngg2xhqrgv5c7ipm.png" alt="MozJPEG CLI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Example of CLI command to compress an image with &lt;strong&gt;MozJPEG&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ry_rn8pP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/n9joubq8d60hyjic2q8c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ry_rn8pP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/n9joubq8d60hyjic2q8c.png" alt="WebP CLI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Example of CLI command to convert a JPEG image to &lt;strong&gt;WebP&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We also have &lt;strong&gt;npm&lt;/strong&gt; packages that offer us a wrapper with a much simpler API and that we can integrate into our Javascript application workflow.&lt;/p&gt;

&lt;p&gt;One of these packages is &lt;a href="https://github.com/cyrilwanner/next-optimized-images"&gt;next-optimized-images&lt;/a&gt; with options that go far beyond compressing the images, as it contains other packages as a dependency which can generate LQIP&lt;sup&gt;(11)&lt;/sup&gt; images with &lt;a href="https://github.com/zouhir/lqip-loader"&gt;lqip-loader&lt;/a&gt; or &lt;a href="https://github.com/herrstucki/responsive-loader"&gt;responsive-loader&lt;/a&gt; that generates the different sizes of the responsive images that we need on our site. It uses several packages of &lt;a href="https://github.com/imagemin/"&gt;imagemin&lt;/a&gt; for image optimization so let's take a look at it.&lt;/p&gt;

&lt;h3&gt;
  
  
  imagemin
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/imagemin/"&gt;Imagemin&lt;/a&gt; is not a GitHub repository, but an organization with all the repositories (37).&lt;/p&gt;

&lt;p&gt;It is a very modular system, and its base package &lt;strong&gt;imagemin&lt;/strong&gt; has &lt;a href="https://github.com/imagemin/imagemin/blob/master/package.json#L38-L40"&gt;3 encoders&lt;/a&gt; (JPEG, SVG and WebP) defined as dependencies, but we can add all we need.&lt;/p&gt;

&lt;p&gt;We will see that there are a couple of patterns in the names of the repositories of this organization:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;image-[compressor]&lt;/strong&gt;, such as &lt;a href="https://github.com/imagemin/imagemin-webp"&gt;image-webp&lt;/a&gt; that has the module or plugin to work with WebP images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;[compressor]-bin&lt;/strong&gt;, such as &lt;a href="https://github.com/imagemin/cwebp-bin"&gt;cwebp-bin&lt;/a&gt; that &lt;a href="https://github.com/imagemin/cwebp-bin/tree/master/vendor"&gt;contains&lt;/a&gt; a compiled version for each of the supported operating systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach makes it a very versatile solution, since the modules can be maintained, updated and published separately.&lt;/p&gt;

&lt;p&gt;It can be used both as CLI &lt;em&gt;(Command Line Interface)&lt;/em&gt; with &lt;a href="https://github.com/imagemin/imagemin-cli"&gt;imagemin-cli&lt;/a&gt; and from Javascript. &lt;a href="https://github.com/EscuelaIt/Optimizacion-Imagenes"&gt;Here&lt;/a&gt; you will find examples of implementation in &lt;strong&gt;mpm&lt;/strong&gt;, &lt;strong&gt;Gulp&lt;/strong&gt; and &lt;strong&gt;Webpack&lt;/strong&gt; from some exercises of a course I taught at Escuela IT. In these examples you can see that I always keep the original image, to be able to compress always from the original image and not &lt;strong&gt;re-compress&lt;/strong&gt; an image that has already been compressed, and sometimes by another compressor.&lt;/p&gt;

&lt;p&gt;It is not a good idea to do recompress an image. In this video you can see an example of what happens when doing it:&lt;/p&gt;

&lt;p&gt;The format with the best results is &lt;strong&gt;FLIF&lt;/strong&gt;&lt;sup&gt;(12)&lt;/sup&gt;, but it is a format that is not supported by current browsers, so &lt;strong&gt;MozJPEG&lt;/strong&gt; could be a viable option. But as I said, I prefer to keep the original image, in PNG if possible, to preserve all the information and generate from it, the compressed image and/or change of format.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Imagemin&lt;/strong&gt; is the most comfortable option if what we want is to automate the compression of the images in the process of production. Both because of the amount of plugins, and for the ease of integrating them into our stack.&lt;/p&gt;

&lt;p&gt;Take into account the time to find the correct parameters for the best result, since each imagemin plugin has its own scale of values ​​for optimization &lt;em&gt;(it might ring a bell, since the same happens in image editors)&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimization of images with third-party online services
&lt;/h2&gt;

&lt;p&gt;Another option is to use an online service such as &lt;a href="https://cloudinary.com/"&gt;Cloudinary&lt;/a&gt;, &lt;a href="https://www.imgix.com/"&gt;imgix&lt;/a&gt;, &lt;a href="https://www.fastly.com/io"&gt;Fastly's Image Optimizer&lt;/a&gt;, &lt;a href="https://imageoptim.com/api"&gt;ImageOptim API&lt;/a&gt; or &lt;a href="https://kraken.io/"&gt;Kraken&lt;/a&gt;. These services offer us much more than optimize, resize or change their format, like a cache service and &lt;a href="https://en.wikipedia.org/wiki/Content_delivery_network"&gt;CDN&lt;/a&gt;. This is an option to consider if our product is visited from different parts of the world.&lt;/p&gt;

&lt;p&gt;Each of them has its own functionalities, advantages, configurations and integrations, butbeing a &lt;a href="https://cloudinary.com/partners/media-developers"&gt;Cloudinary MDE&lt;/a&gt; I will talk about &lt;strong&gt;Cloudinary&lt;/strong&gt; 😊&lt;/p&gt;

&lt;p&gt;To know more about Cloudinary's features you can check the web. I want to talk about the features that I like, which I think provide value, both for us as demanding developers and for the IX.&lt;/p&gt;

&lt;p&gt;Let's start by saying that in the &lt;a href="https://cloudinary.com/pricing"&gt;plans they offer&lt;/a&gt; there is a free one that we can use to try the service without many limitations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Image Optimization
&lt;/h3&gt;

&lt;p&gt;We can optimize both the images that we upload to the &lt;strong&gt;Media Library&lt;/strong&gt; on our account with the &lt;code&gt;/upload/&lt;/code&gt; method, as well as with remote images, with the &lt;code&gt;/fetch/&lt;/code&gt; method&lt;sup&gt;(13)&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R57rWD7n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/wqwgtompkkxgnrwujkf9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R57rWD7n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/wqwgtompkkxgnrwujkf9.png" alt="Cloudinary: Methods"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this example we will use the API using the url&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---umomj67--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/w2r9gg2otodn2c2xhmrf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---umomj67--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/w2r9gg2otodn2c2xhmrf.png" alt="Cloudinary: f_auto"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Between the type &lt;code&gt;/upload/&lt;/code&gt; and the image version &lt;code&gt;/v1570203279/&lt;/code&gt;, we have the transformation methods, in this case I have put &lt;code&gt;f_auto&lt;/code&gt;, which refers to &lt;strong&gt;automatic format&lt;/strong&gt;&lt;sup&gt;(14)&lt;/sup&gt;. This parameter will deliver the image in the best possible format according to the client's request. If our client supports &lt;strong&gt;WebP&lt;/strong&gt;, it will deliver WebP. If our client supports &lt;strong&gt;JPEG 2000&lt;/strong&gt;, as it is the case of Safari, it will consider it, regardless of the original image format.&lt;/p&gt;

&lt;p&gt;Let's look at an example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RtaJsJiS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/zbawlrfk46gsiadm0vxx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RtaJsJiS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863167/blog/zbawlrfk46gsiadm0vxx.png" alt="Cloudinary: Chrome vs Firefox vs Safari"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the image we see an example of one of the images on the Cloudinary website, in this case &lt;code&gt;homepage-XX.png&lt;/code&gt;, there are requests for the different Media Query sizes because I have forced it. The original image is in &lt;strong&gt;PNG&lt;/strong&gt; format and we can see that although the request made by HTML is &lt;code&gt;.png&lt;/code&gt;, Cloudinary delivers a &lt;strong&gt;WebP&lt;/strong&gt; image for Chrome and Firefox, and in the case of Safari it delivers a &lt;strong&gt;JPEG 2000&lt;/strong&gt; format. The JPEG 2000 format is larger than WebP, but Safari currently does not support that image format, instead it receives a JPEG 2000 image that it can render and that is smaller than JPEG and the original PNG.&lt;/p&gt;

&lt;h3&gt;
  
  
  Responsive images
&lt;/h3&gt;

&lt;p&gt;The optimization of the images not only has to do with the compression and quality of the image, we must also consider delivering them to the correct dimensions according to the device, pixel density&lt;sup&gt;(15)&lt;/sup&gt; and &lt;strong&gt;media queries&lt;/strong&gt;. Here, Cloudinary pleasantly surprises us again with &lt;a href="https://responsivebreakpoints.com/"&gt;Responsive Breakpoints Results&lt;/a&gt;, a tool to generate all the images and the code to create the media queries we need.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pmsfd4xB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863169/blog/gs0jdrgpzzsxzyiebksq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pmsfd4xB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863169/blog/gs0jdrgpzzsxzyiebksq.jpg" alt="Responsive Breakpoints Results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Implementation, scalability and integration
&lt;/h3&gt;

&lt;p&gt;Another thing I like about Cloudinary is the great support they offer for different &lt;a href="https://cloudinary.com/documentation/framework_integration#sdks"&gt;SDKs&lt;/a&gt; for implementation: HTTPS/HTTP, Ruby, PHP, Python, Node.js, Java, JS, jQuery, React, Angular, .Net, Android and iOS. We also have them available &lt;a href="https://github.com/cloudinary"&gt;Open Source&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Their &lt;a href="https://cloudinary.com/documentation/framework_integration#add_ons"&gt;add-ons&lt;/a&gt; make the solution scalable. We can activate &lt;em&gt;(these are paid)&lt;/em&gt; services for Auto-Tagging with Machine Learning, remove the background of the images with &lt;a href="https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon.html"&gt;Cloudinary AI Background Removal&lt;/a&gt; or apply style transfer with &lt;a href="https://cloudinary.com/documentation/neural_artwork_style_transfer_addon"&gt;Neural Artwork Style Transfer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As for integration, it is very interesting to see that we can integrate through &lt;a href="https://cloudinary.com/documentation/framework_integration#cms_ecommerce_integrations"&gt;CMS-eCommerce integrations&lt;/a&gt; with Salesforce Commerce Cloud, Magento, Wordpress or Zapier.&lt;/p&gt;

&lt;h3&gt;
  
  
  This does not end here
&lt;/h3&gt;

&lt;p&gt;There are many features, add-ons, plugins, and tools. If you want to have a simple and visual guide of the highlights of Cloudinary, here is a website where you can play with the API and some of the photos that were taken at the &lt;strong&gt;JS Camp 2019&lt;/strong&gt;, &lt;a href="https://cloudycam.dev/nucliweb"&gt;CloudiCam.dev&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  One more thing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Other online services
&lt;/h3&gt;

&lt;p&gt;There are many online services to compress images which usually compress the images one by one, and not by batch as desktop applications do. I just want to comment a couple of them that I find interesting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://squoosh.app/"&gt;Squoosh&lt;/a&gt;. What I like about this application is that it runs entirely in the browser. It has been developed by the engineers at Google, it is &lt;a href="https://github.com/GoogleChromeLabs/squoosh/"&gt;open source&lt;/a&gt; and uses &lt;a href="https://webassembly.org/"&gt;WebAssembly&lt;/a&gt; to run the [codecs] in the browser binaries](&lt;a href="https://github.com/GoogleChromeLabs/squoosh/tree/4a01d0d548bf51e75ddb1d9e3d0259b5ab1c87b5/codecs"&gt;https://github.com/GoogleChromeLabs/squoosh/tree/4a01d0d548bf51e75ddb1d9e3d0259b5ab1c87b5/codecs&lt;/a&gt;) written in C or C ++.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://compress-or-die.com/"&gt;Compress-Or-Die&lt;/a&gt; uses the traditional format of running compression on the server side. What I like is that it offers many customization options, all of them documented, with very good results. It also includes an &lt;a href="https://compress-or-die.com/analyze"&gt;image analyzer&lt;/a&gt; with very detailed image information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Ooops! Do not forget to optimize any image
&lt;/h3&gt;

&lt;p&gt;It is very easy to make the &lt;em&gt;(unconsciously)&lt;/em&gt; mistake of not optimizing our images, but we have an option to integrate one of the following tools.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://imgbot.net/"&gt;ImgBot&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;A service to optimize images based on &lt;a href="https://github.com/dlemstra/Magick.NET"&gt;Magick.NET&lt;/a&gt; (a .NET library for &lt;a href="https://imagemagick.org/"&gt;ImageMagick&lt;/a&gt;) that we can integrate with our GitHub repository. We can configure it to indicate how often it will parse our images, define folders, images or extensions to ignore, as well as the level of compression. The most interesting thing is that it generates a Pull Request with the suggestion of optimized images.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qd1sy3zX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/trpyp3n3er7wfs3gjxdi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qd1sy3zX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/trpyp3n3er7wfs3gjxdi.png" alt="ImgBot: Pull Request"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://github.com/marketplace/actions/image-actions"&gt;image-actions&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;With the recent release of &lt;a href="https://github.com/features/actions"&gt;Actions from GitHub&lt;/a&gt;, the people of &lt;a href="https://calibreapp.com/blog/compress-images-in-prs/"&gt;Calibre&lt;/a&gt; have worked on a solution similar to that of &lt;strong&gt;ImgBot&lt;/strong&gt;. The philosophy is the same, generate a Pull Request with optimized images.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7TJnMBAz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/jnfoyizrljpqkq0kiqu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7TJnMBAz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/jnfoyizrljpqkq0kiqu5.png" alt="image-actions: Pull Request"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The shoemaker's son...
&lt;/h3&gt;

&lt;p&gt;All the images in this article have been optimized with &lt;strong&gt;ImageOptim&lt;/strong&gt;, mostly in format &lt;strong&gt;PNG&lt;/strong&gt; as they are screenshots with text. &lt;strong&gt;PNG&lt;/strong&gt; is the ideal format to maintain quality and not generate noise around texts.&lt;/p&gt;

&lt;p&gt;List of optimized images with ImageOptim&lt;sup&gt;(16)&lt;/sup&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wdwFcgBz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/ukg0ws8cenwlktwyc8ww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wdwFcgBz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/ukg0ws8cenwlktwyc8ww.png" alt="ImageOptim: list images"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://images.guide/"&gt;Essential Image Optimization&lt;/a&gt;, I think it is the best and most complete image optimization guide, maintained by &lt;a href="https://twitter.com/addyosmani"&gt;Addy Osmani&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://addyosmani.com/blog/image-optimization-tools/"&gt;Tools for image optimization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jamiemason.github.io/ImageOptim-CLI/"&gt;ImageOptim-CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://foldleft.io/image-tools/"&gt;Benchmarks of Image Optimization Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://addyosmani.com/blog/lazy-loading/"&gt;Native image lazy-loading for the web!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization"&gt;Optimization of images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codeburst.io/5-steps-to-speed-up-your-image-heavy-website-65c874a86966"&gt;5 steps to speed up your image heavy website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dougsillars.com/2018/05/21/state-%20of-the-web-top-image-optimization-strategies/"&gt;State of the Web: Top Image Optimization Strategies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.smashingmagazine.com/2018/07/converting-images-to-webp/"&gt;Converting Images To WebP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-create-and-serve-webp-images-to-speed-up-your-websi%20te"&gt;How To Create and Serve WebP Images to Speed ​​Up Your Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web.dev/use-imagemin-to-compress-images"&gt;Use Imagemin to compress images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloudinary.com/blog/low_quality_image_placeholders_lqip_explained"&gt;Low Quality Image Placeholders (LQIP) Explained&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/breaktheloop/jpeg-compression-algorithm-969af03773da"&gt;JPEG Compression Algorithm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://compress-or-die.com/Understanding-JPG"&gt;Finally understanding JPG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://compress-or-die.com/Understanding-PNG"&gt;Finally understanding PNG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Image and Video Optimization Course
&lt;/h2&gt;

&lt;p&gt;Finally, I want to share that I am working on an online &lt;strong&gt;Optimization course Images and Videos&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://optimizacion-imagenes.github.io/Curso/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tpc5thsm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/perfreviews/image/upload/v1570863168/blog/zjjpseuh4ggxfenux3pj.jpg" alt="Image and Video Optimization Course"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://optimizacion-imagenes.github.io/Curso/"&gt;Web and course syllabus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/optimizacion-imagenes/AMA"&gt;Ask Me Anything, on Image and Video Optimization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;(1)&lt;/strong&gt; I add Sketch as an application to export images since in mobile application environments it is more common to use PNG files for the application interface. In general, in web environments, the interfaces defined in Sketch end up being represented with CSS in a simple way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(2)&lt;/strong&gt; Each editing program, compression application or compressor by command line, has its own scale of values ​​to measure the quality of compression. This makes a fair comparison between different programs virtually impossible. Here is an article &lt;a href="https://kornel.ski/en/faircomparison"&gt;How to compare images fairly&lt;/a&gt; of &lt;a href="https://twitter.com/kornelski"&gt;Kornel Lesiński&lt;/a&gt; where he talks about it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(3)&lt;/strong&gt; You can investigate more about the impact of Subsampling (Chroma Subsampling in English) here &lt;a href="https://images.guide/#chroma-subsampling"&gt;Chroma (or Color) Subsampling&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(4 )&lt;/strong&gt; In Photoshop, if instead of exporting we select "Save as ...", it offers a large number of image formats &lt;a href="https://helpx.adobe.com/photoshop/using/file-formats.html"&gt;"Graphic file formats"&lt;/a&gt;, most not compatible with browsers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(5)&lt;/strong&gt; WebP is a lossy image format that sacrifices a lot of quality, so I recommend validating the image quality in low quality percentages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(6)&lt;/strong&gt; GIMP has very documentation well, in the [Save/export images] section (&lt;a href="https://docs.gimp.org/2.10/es/gimp-images-out.html"&gt;https://docs.gimp.org/2.10/es/gimp-images-out.html&lt;/a&gt;) we will have all the details of the parameters that we can configure in this window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(7)&lt;/strong&gt; If you look for ImageOptim in the App Store, you will find an application called &lt;strong&gt;Image optimizer Compression&lt;/strong&gt;, which &lt;a href="https://twitter.com/nucliweb/status/1175353637117353984"&gt;is not the application&lt;/a&gt; &lt;strong&gt;ImageOptim&lt;/strong&gt; we are talking about.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(8)&lt;/strong&gt; In the list of compressors that ImageOptim uses is &lt;a href="https://github.com/google/guetzli"&gt;Guetzli&lt;/a&gt; from Google. It is a very effective compressor quality/weight of the images, but it is extremely slow in the process. If we select that compressor in the configuration, ImageOptim will notify us with a very deterrent message "It can take up to 30 minutes per image. Your system may not respond while Guetzli is running." &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(9)&lt;/strong&gt; I am &lt;a href="https://twitter.com/nucliweb/status/1174964957990928384"&gt;working&lt;/a&gt; in a comparison of those applications, stay tuned to &lt;a href="https://twitter.com/nucliweb"&gt;twitter&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(10)&lt;/strong&gt; I leave you a link to the repository &lt;a href="https://github.com/nucliweb/images-optimization-env"&gt;images-optimization-env&lt;/a&gt; where you can do compression tests with native compressors on Mac &lt;em&gt;(I compiled the source codes on my machine)&lt;/em&gt;. I used &lt;strong&gt;npm&lt;/strong&gt; only to manage the &lt;a href="https://github.com/nucliweb/images-optimization-env/blob/master/package.json#L6-L25"&gt;scripts&lt;/a&gt;, so it doesn't require installation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(11)&lt;/strong&gt; My partner and friend &lt;a href="https://twitter.com/jmperezperez"&gt;José M. Pérez&lt;/a&gt; tells us about this technique in the article &lt;a href="https://jmperezperez.com/medium-image-progressive-loading-placeholder/"&gt;How Medium does progressive image loading&lt;/a&gt; &lt;em&gt;(October 2015)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(12)&lt;/strong&gt; FLIF is the acronym for Free Lossless Image Format, a new lossless image format with a few ratios Very interesting compression, you can find more information on the official website &lt;a href="https://flif.info/"&gt;flif.info&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(13)&lt;/strong&gt; &lt;a href="https://cloudinary.com/documentation/image_transformations#delivery_types"&gt;Cloudinary Delivery Types&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(14)&lt;/strong&gt; &lt;a href="https://cloudinary.com/documentation/image_transformations#supported_image_formats"&gt;Cloudinary Supported image formats&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(15)&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Pixel_density"&gt;Pixel density&lt;/a&gt;&lt;em&gt;(Wikipedia)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(16)&lt;/strong&gt; In the column &lt;strong&gt;Best tool&lt;/strong&gt; we can see the codec or combination of codecs used for compression. By default this column is not visible, you can add it with the right button &lt;em&gt;(context menu)&lt;/em&gt; in the column header.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>images</category>
      <category>optimization</category>
      <category>performance</category>
      <category>webperf</category>
    </item>
  </channel>
</rss>
