A good choice in image formats depending on the use that we are going to give them is essential, taking into account that it is not the same to use it for magazines, social networks, blogs, advertising campaigns, graphic design etc.
Choosing the correct types of images and image formats is one of the most important tasks, since for some cases we will be interested in having an optimal quality and for others perhaps an adequate size of photos.
It should be noted that for web optimization, any extension or size of photos is not valid.
Most important types of images
PNG
Format without loss of quality, is one of the most used being compatible with practically all browsers and allows the use of transparencies. It is widely used in graphic design and web design.
It is recommended to only use the PNG extension when the images need transparency or for the use of high quality images, for the web it is recommended to use it only when it is essential.
JPG
Perhaps the most standard of image formats and the most used in web pages. It allows a balance between quality and size of photos, being able to obtain photos of medium-high quality with reduced size. It can be compressed by choosing the quality we want it to have.
GIF
Fairly widespread also for the use of images on web pages, although it has been deprecated. It is small in size and allows animations with frame changes.
Despite the fact that the size of the photos it generates is quite small, at present it is not recommended within the image formats to be used. The range of colors it offers is very limited with 256 colors compared to the 16 million that, for example, jpg formats provide.
RAW
RAW format images are intended for professional profiles only. When an image is generated in raw format, it is saved with all the information and without any alteration, which allows an excellent quality to be achieved later when editing and post-processing those images.
The RAW format is advisable only if the images obtained are going to be post-processed.
SVG
Format that is based on scalable vectors. It is usually applied for graphic design because it does not lose any quality when zooming in on the image, unlike image formats that work with pixels, which lose a lot of quality (pixelation) when enlarged.
It is open source and multiplatform and as a disadvantage it generates a large size of photos.
On the web it is used a lot because they are images that are valid for responsive (adapting both for mobile and for PC) without losing quality.
For graphics, statistics or responsive, it is an image format to take into account.
In the following example we can see the same svg image in different photo sizes
BMP
One of the pioneers in image formats, although it is no longer used, there are formats that far exceed it in compression capacity or quality.
WEBP
Format acquired by Google, although today it is open source with the intention of becoming the web standard. It is capable of having a fairly high quality with a reduced size, it competes with the jpg format for being the best in that characteristic.
Another option to take into account is that this image format is highly valued by Google and SEO (web positioning) is set by Google.
This file format is not yet supported by all programs, so if necessary, you can convert webp to png, jpg and other formats using an online converter such as AnyConv.