There are two main questions to ask yourself when you decide which image file format to use.
First, what type of image is it? Is it a casual picture of your dog, or a detailed graphic with a professional purpose? Will it need to be altered or resized from it’s current state?
Second, how do you plan to use this image? Will it be published on a company website? Or, will it be for your own personal use?
The answers to these questions will help guide you to select your optimal file type.
What is a JPG?
The JPG image file type, typically pronounced jay-peg, was developed by the Joint Photographic Experts Group (JPEG) in 1992. The group realized a need to make large photographic files smaller, so that they could be more easily shared.
Some quality is compromised when an image is converted to a JPG. The reason is because the compression is lossy, which means that certain unnecessary information is permanently deleted. A JPG does, however, allow you to create smaller file size than you could with a PNG.
A JPG should be used in any situation when it’s important to have a small file. Beyond the initial saving as a JPG, there are tools that will allow you to shrink the file further. This is useful for web images, as the smaller size will increase the speed at which the page loads. As broadband internet connections become more universal, this is becoming less of an issue. However, those with slower internet connections or older, less powerful computers will thank you for your consideration.
What is a PNG?
The PNG file format, usually read aloud as ping, was created in the mid-1990’s to act as a replacement for the Graphics Interchange Format (GIF). Limitations of the GIF prompted the creation and prevalence of the PNG.
An important benefit, and oftentimes deciding factor for using a PNG file, is that–unlike a JPG–they support transparency. This allows you to have a transparent background around an irregular-shaped object and avoid a white (or other colored) box outlining your image. If you require transparency, you’ll definitely want to opt for a PNG.
File compression for a PNG is lossless. Like the term indicates, lossless compression retains all of the data contained in the file, within the file, during the process. Lossless compression is necessary when you have images that are still in the editing process. PNGs are often used if size is not an issue and the image is complex, because a PNG file holds more information than a JPG. It’s also ideal to use a PNG for a graphic image, such as the icon below.
So, JPG or PNG?
There is no right or wrong answer! Think of your choice as a process of optimization, and allow the factors we covered guide you in your decision.
If you are still curious, you can learn more about image file formats in this blog post, Understanding Image File Formats.