SpyreStudios

Web Design and Development Magazine

  • Design
  • Showcase
  • Inspirational
  • Tutorials
  • CSS
  • Resources
  • Tools
  • UX
  • More
    • Mobile
    • Usability
    • HTML5
    • Business
    • Freebies
    • Giveaway
    • About SpyreStudios
    • Advertise On SpyreStudios
    • Get In Touch With Us

How to Optimize, Compress, and Save Images For the Web

July 9, 2018 by Alex Fox

It’s not a sudden discovery that the size of web pages are increasing. Developers minify their code, ditch expansive libraries, and shift code to the server side, all in an attempt to shave 100 kB off their code base. You may even be asked to drop valuable libraries like jQuery in an attempt to speed up your page loads. But then design comes in, and happily plops down a 1 megabyte header image, insisting they need the absolute highest quality visuals and nothing else will suffice.

There is, of course, some merit in that argument. Consumers are visually driven, and high-quality photography and well-design layouts are an excellent way to get new visitors interested in your site. But consumers are not so eagle-eyed that they’ll hone in on minor compression artifacts. We can and must do better in order to improve load times and even boost SEO. After all, Google does penalize pages for slow load times and large page sizes. And in the awkward age of a high mobile user base and no HTML or CSS-driven way to avoid loading the biggest image possible on the most data-starved connections, shrinking file size has more than one benefit.

Using Photoshop to Save Images for the Web

If you’re editing images in Photoshop, you have an number of ways to save out photos that are cognizant of file size. The easiest method is adjusting the quality slider when saving as a JPG, of course. But that’s a somewhat imprecise science. A better tool is the Save for Web export tool. Even though it’s old and technically made to turn Photoshop layouts in to “web-ready” slices (I shiver at the thought of those days), it offers extreme control over image compression.

You can access Save for Web under File > Export > Save for Web and Devices.

save images for the web

This will pop up a menu showing a preview of your image, as well as a side panel of options. Here you can compare the effects of your compression choices in real-time. Lower the quality of a JPG to 0 for example, to see how truly awful it might look. This window can do JPGs, GIFs and PNGs, all with their own impressive selection of modes and settings. Explore them to get a feel for what kind of effects the settings have your images. You can also explore the built-in presets to see what Photoshop thinks might be helpful.

save images for the web

The 2-up and 4-up panels can also be useful. Here, you can compare two or four different compression methodologies, making it easy to pick the one that best suits your needs.

Click on the image to explore the 4-Up pane’s usefulness.

Just click on them at the top of the window to activate the mode. Then click on each preview window and set your compression settings individually. You can also grab the previews and pan them around. Their linked together, so panning one image pans them all, allowing for consistent comparison.

Look at the bottom of any preview to see the file size and essentially stats.

If you want to see the image in a browser window, you can click the “Preview” button to load it up in your default browser.

Once you’ve selected your favorite settings, click the “Save” button to save the file to disk.

Compressing Photos Effectively with Free Tools

More likely, however, you’ve had photos dropped on your desk by your client. You didn’t select them or edit them, but you have to work with them. Fortunately, you can select from a bevy of compression tools to shrink your file. Here our some of our top picks.

1. TinyPNG

save images for the web tinypng

This unassuming in-browser web tool, TinyPNG, will work with both JPGs and PNGs. It works with any file between 5 MB, and can handle 20 files at once. It rapidly and effectively reduces the sizes of both file types, often knocking between 30 and 50 percent of the file size. It’s not uncommon to see reductions as much as 90 percent with especially inefficient starting files. If you don’t like the web interface, you can instead opt for API access and build your own tool. You can also pay a one-time fee of $50 for a Photoshop plugin. This way, you can ditch Save for Web and go directly to TinyPNG’s impressive compression tools. If you’re just sick of the 5 MB limit or the 20 file per compression cap, sign up for TinyPNG Pro at $25 per year and remove both.

2. Compressor

save images for the web compressor.io

Like TinyPNG, Compressor is an in-browser tool made for shrinking files. It accepts JPGs and PNGs as well as GIF and SVG files, with a limit of 10 MB. It also offers a little more control: users can choose between lossy and lossless compression. Unfortunately, you can only upload one photo at a time, and it’s compression is not as powerful as TinyPNG’s algorithm. It does producer slightly higher quality images, but you’d really need to be zooming into 100 percent to notice the difference.

3. Kraken

save images for the web kraken.io

Kraken is a professional tool for users that need the greatest control and the highest volume. There is a free version that you can try out, and even that’s surprisingly feature rich. This includes an expansive pane of expert settings for well-versed users, including quality levels, metadata management and even chroma subsampling method selection for JPGs. Users looking to get the full experience with Kraken Pro also get but image resizing, import from URL and full page compression, full API access, WordPress and Magento plugins and Kraken cloud storage. Plans run from $5 to $79 per month, depending on your volume of megabytes compressed. The free version is limited to 1 MB, but all the image compression tools are still fully functional.

Using Both?

Let’s say you’re in pursuit of the smallest effective file possible. Could you use both Save for Web and an off-the-rack compression tool like TinyPNG? Absolutely. It might even look acceptable. But you can also run into situations where TinyPNG finds nothing to compress. In very rare cases, the image returns from compression unusable, with too many artifacts like banding and crunch. But in that case, you just go with your carefully-exported Photoshop file, having only wasted five seconds making that determination.

Filed Under: Resources, Tutorial, Uncategorized Tagged With: images in web design, loading time, page load speed, web design

Recent Posts

  • 31 Fresh Design Elements for Spring and Easter
  • 10 Templates for Music Concert Flyers
  • How to Build a Web Scraper Using Node.js
  • Best PHP Books, Courses and Tutorials in 2022
  • How to Get Your First Web Design Client

Archives

  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • May 2008
  • April 2008

Categories

  • Accessibility
  • Android
  • Apps
  • Art
  • Article
  • Blogging
  • Books
  • Bootstrap
  • Business
  • CSS
  • Design
  • Development
  • Ecommerce
  • Fireworks
  • Flash
  • Freebies
  • Freelance
  • General
  • Giveaway
  • Graphic Design
  • HTML5
  • Icons
  • Illustrator
  • InDesign
  • Infographics
  • Inspirational
  • Interview
  • Jobs
  • jQuery
  • Learning
  • Logos
  • Matrix
  • Minimalism
  • Mobile
  • Motion Graphics
  • Music
  • News
  • Photoshop
  • PHP
  • Promoted
  • Rails
  • Resources
  • Showcase
  • Tools
  • Tutorial
  • Twitter
  • Typography
  • Uncategorized
  • Usability
  • UX
  • Wallpapers
  • Wireframing
  • WordPress
  • Work

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

SpyreStudios © 2022