Choosing the correct image format
Deciding what image format to use is usually the first step you take when you start your website. Take a look at this table for an overview and comparison of the available image formats:
Format |
Features |
---|---|
GIF |
256 colors Support for animation Transparency |
PNG |
256 colors True colors Transparency |
JPEG/JPG |
256 colors True colors |
From the preceding listed formats, you can conclude that, if you had a complex image that was 1000 x 1000 pixels, the image in the JPEG format would be the smallest in file size. This also means that it would load the fastest.
The smallest image is not always the best choice though. If you need to have images with transparent parts, you'll have to use the PNG or GIF formats and if you need an animation, you are stuck with using a GIF format or the lesser know APNG format.