Jun 13, 2020 - 04:44 AM
It is important to put some thought into this matter, however, since the formats you use for your site’s images have an impact. Some types of graphics look better and don’t occupy as much storage space, for example, which translates to better performance without a loss in quality.
In this article, we’re going to talk about why your choice of image formats is vital. Then we’ll break down your options, and help you pick the best image format for your website. Let’s take a look!
Here's how to choose the optimal image format for your #website
Why the image formats you use matter
As we’ve mentioned, there are dozens of image formats to choose from. However, when it comes to the web, most people stick to a handful of standbys, including JPEGs, PNGs, and GIFs.
We’ll talk about what makes each of these image types unique in a moment. For now, let’s break down why the format(s) you use on your website matter in a more general sense.
The types of images you use affect your site’s:
Performance. Some image formats take up more space than others, which can affect your site’s loading times.
Appearance. As you might imagine, some image formats include more detail and are higher-quality than others.
Scalability. When you stretch or shrink an image too much, its quality will suffer. How much leeway you have depends on the image format you use. This affects your site’s ability to look good on both large and small screens.
In most cases, you’ll want to stick to using one or two image formats throughout your website, to maintain a consistent standard. The formats you choose should ideally provide a nice balance between quality and performance.
The 3 primary image formats used on the web: JPEG vs PNG vs GIF
As we mentioned earlier, there are some image formats that are used much more commonly online than others. The three options we’re going to introduce below are some of the most popular and useful formats, which makes them perfect picks for almost any website like Apps4Rent
The term JPEG stands for Joint Photographic Experts Group, and it was coined in 1986. The main benefits of this format are that it can display millions of colors, and it’s particularly well-suited to high compression levels.
In general, JPEG is an excellent option for displaying complex photographs that include a lot of colors. Here’s a quick example:
Although JPEGs hold up well when compressed, you can usually notice a small drop in quality after optimizing images. Though, this all depends on the level of compression that’s selected for the image. The quality drops aren’t often noticeable unless you’re looking very closely.
On the other hand, JPEGs are not perfect for images with very few color data, like interface screenshots and other simple computer-generated graphics. We’ll cover this more when talking PNGs in the next section:
Portable Network Graphics (PNGs) are just as popular as JPEGs on websites. They also support millions of colors, although you’re much better off using PNGs for images that contain less color data. Otherwise, your image is going to be ‘heavier’ than the same image saved as a JPEG.
This is a screenshot of the WordPress dashboard. PNGs do a great job when you have an image with rapid transitions between colors that need to remain sharp. For example, when you’re taking a screenshot of a user interface where different interface elements strongly transition between dark and light backgrounds, it’s much better to use PNGs. Like this part here – the transitions between the white, gray and blue:
Saving the image as a JPEG could result in blurry edges and overall distorted presentation.
One more advantage of PNGs is the fact that they support transparency. This makes them a fantastic option for logos and icons in particular. Here’s a quick example of the ThemeIsle logo in PNG format, with a transparent background:
PNGs are usually the best image format for logos
Overall, compressed PNGs are also better when it comes to retaining quality – due to the lossless compression algorithm used with PNGs vs the lossy algorithm that’s popular with JPEGs.
Unlike the two formats we’ve talked about so far, Graphics Interchange Format (GIFs) have far more specific use cases. Although you can have a static GIF image, most people use this format to showcase animations, such as this one:
JPEGs and PNGs don’t generally support animations (although there is a format called Animated Portable Network Graphics – APNGs). That makes GIFs very useful. As you can imagine, however, these types of images weigh a lot, due to the many frames they contain.
You can optimize GIF files, but in most cases, the results won’t be as good as with other image formats. That means you should aim to use GIFs sparingly throughout your website, only when you need to showcase an animation you can’t create any other way (such as with CSS).
On top of that, GIFs only support up to 256 colors, as well as transparency. That makes them a poor choice for displaying complex images. To make that point even clearer, here’s the same graphic we showed you in the previous two sections, only now as a non-animated GIF:
Not only does it look terrible, but it weighs a hefty 825 KB. This is why using GIFs for static images is generally not advisable.
May 16, 2021 - 08:09 PM