Creating a PNG is a simple process. You can create and edit a PNG in any image editing tool, such as GIMP (as seen in the image above), Microsoft Paint, or similar tools. Even free tools work well for creating and editing PNGs.
Simply open an image in any file type or create a graphic in the image editor and save or export the image as a PNG file type.
For more information about image editors, see the article 12 Alternatives to Photoshop (Free & Premium Options).
Pros and Cons of Using PNG
Pros | Cons |
|---|
They are easy to use and ideal for general purpose usage. | Since PNGs are raster images, you’ll need to create them for a specific size to maintain the quality. |
They’re easy to upload to WordPress and use with any WordPress content. | The quality will change when the image is resized. Sometimes the impact on quality is negligible, but it can also make the image blurry. |
All web browsers can display PNGs. | It’s difficult to make them retina-ready due to the possibility of being blurry. |
PNGs are lossless, so they take compression well without losing quality. | Higher-quality images require a larger file size. Even lossless compression results in a larger file size than SVG images. |
PNGs support transparency. | The larger file sizes can slow down page loading. |
Any image editor will work, so you don’t need specialized tools to create or edit the files. | The larger file sizes require more server space. |
They’re great for social media and email because social media platforms and email clients can handle them with ease. | PNGs do not support animation, so you’ll need another format for animated graphics. |
When to Use a PNG
PNG images are more popular than SVG images. They’re versatile and common, making them excellent choices for almost any situation.
They can be used for photography, graphics, detailed images, and artwork. You can use them for logos and icons if you don’t have access to SVG files. If the image contains hundreds of colors, a PNG is the best choice.
Since they can have large file sizes, it’s best to optimize them as much as possible and only use them where SVGs are not good options.
For more information about optimizing images, see the article How to Optimize Images for Better Performance.
SVG vs PNG: When to Use Each File Type
Now that we have an understanding of the two file types, here’s a short guide on when to use an SVG vs PNG. First, neither is better than the other in all cases. There are times when one is clearly the best choice for specific graphics, while the other is the best choice for other graphics- even on the same web page. With this in mind, here are the best times to use SVG vs PNG:
Use an SVG for graphics such as logos, icons, diagrams, charts, and background graphics. Use them if you need animations that scale easily without a loss in quality. They are especially good for flat graphics. You can also use SVGs when all of your visitors use modern browsers.
Use a PNG for large, detailed images, photographs, and artwork. They’re especially ideal for any images with lots of colors. Also use them for social media and email, since those platforms and clients can handle them well. Use a PNG if you’re not sure the platform can handle an SVG. Also, use a PNG if you don’t want to go through the hassle of handling an SVG, such as installing specialized plugins to add SVGs to WordPress.
Which Should You Use?
There is no one-size-fits-all answer to the question of SVG vs PNG, but you can think about it in one of two ways: best overall advantage vs easiest to use.
Since SVGs are smaller files for the same image, scale to any screen size without a loss of quality, and include animations, it’s a good idea to use SVGs anywhere possible. It’s the best option for optimization. If it can’t be displayed with an SVG, use a PNG. I recommend using use PNG fallbacks with your SVGs. This way, if the SVG fails to load, your visitors will see a PNG in their place.
If you just want to keep it as simple as possible, then use PNGs. They’ll do almost everything you need, and you won’t have to install anything to make them work. You’ll need a different format for animations, such as GIFs or APNGs. Your files will be slightly larger and might not look as good when scaled, but they’ll work without hassle. If you already have a lot of PNG images on your website, I don’t recommend replacing them.