Skip to main content Jump to list of all articles Jump to all topics

Addy Osmani

Image Optimization (eBook)

   Image Optimization (eBook)

ePUB, Kindle, PDF

$ 19.00

Images have always been a key part of the web. Our brains are able to interpret images much faster than text, which is why high-quality visuals drive conversions and user engagement.

That said, loading images efficiently at scale isn’t a little project for a quiet afternoon. It requires understanding of compression techniques, loading behavior, image decoding and image CDNs, adaptive media loading and caching.

This book will equip you with everything you need to know to optimize how you compress, serve and maintain images — boosting performance along the way.

  • Published on April 2021

About The Book

Next to videos, images are the heaviest, most requested assets on the web. Some of the biggest size savings and performance improvements can come through a better image optimization strategy. The fewer bytes a browser has to fetch, the less competition there is for a user’s bandwidth, and the quicker that critical image can be displayed, along with page’s content.

With the new Smashing book, Addy Osmani provides a practical modern guide to delivering high-quality images on the web — from formats and compression to delivery and maintenance.

The book focuses on what matters: modern approaches to image compression and image delivery, practical tools and techniques to automate optimization, responsive images, current and emerging image formats, how browsers load, decode and render images, CDNs, lazy-loading, adaptive media loading and how to optimize for Core Web Vitals. Everything in one, single, 528-pages book. Download a free PDF sample (12MB).

Written by Addy Osmani. Illustrated by Espen Brunborg and Nadia Snopek. Reviewers and contributors include Milica Mihajlija, Colin Bendell, Kornel Lesiński, Estelle Weyl, Jeremy Wagner, Tim Kadlec, Nolan O’Brien, Pat Meenan, Kristofer Baxter, Henri (Helvetica) Brisard, Houssein Djirdeh, Una Kravets, Ilya Grigorik, Elle Osmani, Leena Sohoni, Katie Hempenius, Jon Sneyers, and Mathias Bynens.

About The Author

Addy OsmaniAddy Osmani is an engineering manager working on Google Chrome. His team focuses on speed tools and frameworks, helping keep the web fast. Devoted to the open-source community, the projects Addy has contributed to include Lighthouse (an auditing tool for performance and web best practices), Workbox (libraries for offline-caching files using service workers), Yeoman (the web scaffolding tool), Critical (the critical-path CSS optimization tool), and TodoMVC. Addy is the author of the book Learning JavaScript Design Patterns.

Table of Contents

  1. The Humble <img> ElementThe humble <img> element has gained some superpowers over the years. Given how central it is to image optimization on the web, let’s catch up on what it can do.
  2. Optimizing Image QualityMost optimization tools allow you to set the level of quality you’re happy with. Lower quality reduces file size but can introduce artifacts, halos, or blocky degrading.
  3. Comparing Image FormatsEach new image format has a range of effectiveness if you compare and align on a consistent “quality” of experience. In this chapter, we will explore the challenge of defining quality and setting expectations when converting between formats.
  4. Color ManagementIdeally, every screen and web browser in the world would display color in exactly the same way. Unfortunately, they don’t. Color management allows us to reach a compromise on displaying color through color models, spaces, and profiles.
  5. Image Decoding PerformanceHow quickly an image can be decoded determines how soon browsers can show it to the user. Keeping this efficient helps ensure a good user experience. Let’s dig deeper into image decoding to understand how browsers perform behind the scenes and how you can control decoding.
  6. Measuring Image PerformanceIn this chapter, we will look into how to use Lighthouse to audit for unoptimized images and how to monitor a web performance budget for images.
  7. JPEGThe JPEG may well be the world’s most widely used image format. Let’s examine JPEG’s compression modes as these can have a significant impact on perceived performance.
  8. PNGFrom the very basics to palette modes, index and alpha transparency, and compression tips, in this chapter we’ll take an in-depth look at PNGs.
  9. WebPWebP is a relatively recent image format developed with the aim of offering lower file sizes for lossless and lossy compression at an acceptable visual quality. Let’s explore how to use WebP images in production today.
  10. SVGThere are a number of ways to implement SVGs in a web page. In this chapter, we’ll take a look at different approaches and at how to keep your SVGs lean and performant.
  11. Responsive ImagesUsing responsive images is a key part of delivering fully responsive web design. This chapter covers techniques for defining responsive images.
  12. Progressive Rendering TechniquesThere are many progressive image loading techniques that can shorten perceived load time. In this chapter, we’ll look at different ways of progressively loading images to improve performance and the user experience.
  13. Optimizing Network Requests with Caching and PreloadingDownloading files such as images or videos over the network can be slow and costly. HTTP caching, service workers, image spriting, and preloading help optimize network requests. Let’s explore how they work.
  14. Lazy-Loading Offscreen ImagesWeb pages often contain a large number of images, contributing to page bloat, data costs, and how fast a page can load. Let’s take a look at how lazy-loading offscreen images can help improve the situation.
  15. Replacing Animated GIFsIf you’re aiming to improve the loading performance of your pages, animated GIFs aren’t very compatible with that goal. But this is an area of loading performance where, without a lot of work, you can get significant gains without a loss of content quality.
  16. Image Content Delivery NetworksFor sites with large traffic and a global reach, basic optimizations at build time are usually not enough. CDNs help teams to handle known static assets ahead of time as well as dynamic assets to improve load times and site reliability.
  17. HEIF and HEICWhile other image formats may offer broader compatibility, HEIF is worth being familiar with as you may have users wishing to work with this format on iOS.
  18. AVIFAVIF aims to produce high-quality compressed images that lose as little quality as possible during compression. Let’s dive deeper into its features, browser support, and performance.
  19. JPEG XLJPEG XL is an advanced image format aiming to deliver very significant compression benefits over JPEG. In this chapter, we’ll take a closer look at what it has to offer.
  20. Comparing New Image File FormatsWhile the new image formats support roughly the same sets of capabilities, the strength of each differentiates between them. The tables in this chapter aim to offer a summary of some of the more important features and how well each format handles various image types.
  21. Delivering Light Media Experiences with Data SaverBrowsers with Data Saver features give users a chance to explicitly tell us that they want to use a site without consuming so much data. Let’s see how to make use of Data Saver to deliver light media experiences.
  22. Optimize Images for Core Web VitalsWhich metrics should you focus on to improve the user experience? Core Web Vitals focuses on three key aspects of user experience: page loading experience, interaction readiness, and the visual stability of the page. Let’s take a look at each one of them.
  23. Twitter’s Image Pipeline (Case Study)Tweets are often accompanied by images to illustrate, amuse, and increase user engagement. That is why Twitter places so much emphasis on a strong image optimization process. This case study focuses on the different steps that Twitter has taken to load images faster while ensuring they are as impactful as intended.

Technical Details

  • Formats: ePUB, Kindle, PDF (DRM-free)
  • Pages: 528
  • Language: English
  • Released: April 2021
  • Publisher: Smashing Media AG
  • ISBN (PDF): 978-3-945749-95-1

   Image Optimization (eBook)

ePUB, Kindle, PDF

$ 19.00

More Books