
We’re excited to hear your project.
Let’s collaborate!
The earth is round and images are “the usual suspects” of too long page loading times... Along with video content. So, what do you do? You comprise, of course. And then you face a major challenge: resizing images for the web without impacting their quality.
What file format should you select when saving your images for the web? And what type of compression should you choose?
How do you strike a balance between an image file's ideal size and that quality standard that you've set for your website?
On one hand, you strive to optimize your images for the web — to reduce their sizes — and thus to improve your website's overall speed and the user experience delivered there. But, on the other hand, you risk affecting precisely the user experience if you over-comprise your images and compromise their quality.
Now, time to shed some light on this “size vs quality” dilemma here:
In short: what does Google expect you to do when it suggests you to optimize the images on your website for improving your page loading times?
To reduce your image file sizes...
This way, you'd lift some of the weight and give your load time a speed boost!
You can do that either manually, using a script/plugin or... both.
And, when it comes to compressing images for the web, you have 2 common methods to choose from:
And we'll be delving into details in a bit...
What I want to stress out now is a bad practice that too many website owners stubbornly stick to:
Even though image optimization is one of the easiest ways that one can improve his website's performance, it's too often the most underrated one, as well.
Resizing images for the web means no more than:
What does it mean to save your images for the web “correctly”? What file type should you use, more specifically?
Here are the most commonly used ones along with helpful suggestions on their best use cases:
Opt for a JPG (or JPEG) file format when you optimize your images for the web if it's screen shorts and general photos that you're saving.
Images that include many colors...
Now, what you do need to keep in mind is that:
The JPG format helps you reduce the files' sizes for the web, but with a loss in the quality of your images.
And here we get to the compression technique specific to this file format: the lossy compression.
It's a filter that, for the sake of decreasing the image's size, removes some of the data from the original file. This can only affect the quality of the image who's size you're trying to reduce.
Do keep in mind that this “degradation” process is irreversible...
In short: your web page will load faster, yet at the cost of your image's quality. The more you'll try to compress it, the... uglier it'll get.
The solution?
When you're faced with a scenario that requires this type of image format (e.g. saving images with lots of colors, complex still images), strike a balance between its quality and its size.
Just mind you don't over-reduce its size in the name of page loading speed...
Choose the PNG format when resizing your images for the web if you do need high resolutions and high detail.
If it's simple images that you're saving (instead of fine-art photos with lots of colors).
Wondering what's the compression technique specific to this file format? The lossless compression:
A technique where the image's size gets reduced with no compromise on its quality.
There's no point adding that it's a file format specific to animations.
When compressing your animated GIFs, it's the lossless technique that's being used. In other words, no need to worry about the loss of quality.
Is it a logo, text, icon, or simple image that you're planning to optimize for the web? And are you looking for an image format that supports animation and interactivity?
Opt for the SVG format then.
Here are some more reasons why it might be the most suitable one for your use case:
What's that reasonable file size that you should target, that would preserve an acceptable quality of your images?
Yet, nothing beats “the golden rule of moderation” when looking for the balance between size and quality:
Opt for a medium compression rate.
Don't get “greedy”, don't reduce your images' sizes to the point of affecting their quality.
Even if it's top page load speed that you'd be gaining (and speed is UX, right?), the poor quality images resulting will still have a negative impact on the user experience.
Here's some sort of “guide”, including all the essential must-dos when resizing images for the web and optimizing them for an improved page loading time:
The END!
These are our tips and tricks on resizing images for the web and optimizing them without risking to affect their quality.
What other best practices would you have included?
Photo by Markus Spiske on Unsplash
We’re excited to hear your project.
Let’s collaborate!