WTF…ile Types?!
In which K2 tells you WTF an SVG is and how it’s different from a PNG or a PSD or any other number of file types named using an acronym.
I hear people say that around the office all the time. They exclaim, “WTF, K2?!” Now, I get the K2 part. That’s my nickname ‘round these parts. However, I’m not totally sure what WTF stands for. I’m just going to assume that WTF stands for What The File and my coworkers just keep asking me what file types they should be using! To that end, I’ve prepared this handy guide for them, and I’m sharing it with you too!
Jokes aside, let’s be serious for a second. When it comes to digital images, there’s a pretty ridiculous amount of file formats they come in, and there’s no “magic bullet” format that can handle every situation. In this article, I’m going to teach you about different categories of image files, what some of the most popular formats are, a bit of their history, and when you should use them. Let’s get started!
Raster vs. Vector
In the digital realm, there are two main types of two-dimensional images: raster images and vector images. Let’s start with rasters.
Raster images are made of tons of tiny dots called pixels (short for picture elements). They’re best suited for photographs or other high-detail imagery with lots of colours, texture, patterns, etc. Raster images have exact dimensions and cannot be stretched or scaled without causing distortion or quality loss. Occasionally, rasters are called “bitmaps” since a raster image is made of coloured “bits” that are “mapped” to specific positions to render the image.
You can think of a raster image as if it’s a super detailed mosaic, or cross-stitch, built with ridiculously tiny tiles that are all precisely the same size. If you lean in really, really close to your computer or phone screen, you might be able to see the little tiny red, blue, and green dots that make up each pixel. Then again, with the really high pixel densities in new displays, you might not. I’m not gonna get into how they work, or how a bunch of red, green, and blue dots are able to playback Avengers movies. Just trust me that it’s that way.
Y’know what, here’s a picture instead:
Vector images are totally different. While they’re still displayed using pixels (like literally everything on your screen is), they’re constructed entirely differently. Vector files are basically a set of long mathematical instructions telling your computer how to “draw” the image. Kinda like when you had to plot quadratic equations in high school math class. The benefit of making images this way means that you can have perfectly crisp lines, infinite scalability, and typically a smaller file size than raster images. A vector image will maintain the same level of detail whether it’s scaled down to the size of an ant or blown up as big as the moon making them perfect for print purposes.
Raster Image Filetypes
JPEG (Or JPG)
JPEGs are the most common image filetype around. Initially released on September 18, 1992, the name JPEG stands for Joint Photographic Experts Group, the group responsible for making the standard. You might be able to guess from the name that the most popular use of JPEGs is for photographs. JPEG uses adjustable levels of compression to help keep file sizes down. Usually, this is about a 10:1 compression ratio. On the upside, you can get super small files this way. On the downside, you can get ugly “artifacts” in the image, obscuring details. This is especially true when images have areas of contrasting solid colours and text. The more you re-save a JPEG, the worse it becomes. You’re very likely familiar with the format, as most digital cameras and phones primarily shoot photographs using JPEG. Unlike some other formats, JPEG only supports still images without transparency or animation.
When you should use JPEG:
- For photographs and other high-detail images with lots of varying colours.
- For web photos and images for the web and file size is a concern.
- For printing high-detail and high-resolution photos while maintaining a small file size.
- For still images that don’t need to be animated.
- For images that do not include a lot of text, sharp sections of contrasting colour, or gradients.
PNG
The PNG format (pronounced like ping in ping-pong) was initially released on October 1, 1996. Frustrated with the fact that the GIF format (more on that later!) was patented, PNG was created to be a non-patented format to improve on what GIF could do. The name PNG is actually a recursive acronym that means PING is Not GIF. Don’t ask me where that I in PING went. It’s a mystery lost to time. PNG can allow for images with large dimensions to have smaller file sizes than GIF, but typically not as low as JPEG. A significant benefit of PNG over JPEG is that PNG provides for transparency so the background colour of a document/webpage/slideshow can show through. There are two common types of encoding used for PNG: PNG-8 and PNG-24. The main difference is that PNG-8 has a limit of 256 colours, while PNG-24 can display 16 million and can include transparency. Another big difference between JPEG and PNG is that PNGs are a lossless format. You can open a PNG, edit it, save a new copy, and repeat that process infinitely without any introducing artifacts or quality loss.
The image below demonstrates how transparency in PNGs works. On the right side of the image, there’s a brick wall, but the left side of the image is transparent and shows the background of this article page. In particular, notice the shadows from the plants on the left-hand side.
When you should use PNG:
- When you require transparency.
- For images with smooth gradients, sharp lines, crisp text, and solid contrasting colours.
- When you need to display a photograph, but the file size isn’t a concern.
- For logos and icons that require transparency and accurate colours.
- When you need to make multiple edits to an image without quality loss.
GIF
Introduced in 1987, GIF stands for Graphics Interchange Format. (Have you noticed how totally fun and exciting and creative these names have been so far?) GIFs use a type of lossless compression to reduce file size without sacrificing quality. However, GIF can only display a maximum of 256 colours, so that image quality isn’t going to be all that incredible anyway. Unlike the previous formats we’ve looked at, GIF supports animation! You’ve seen them around. Everyone and their mom have a favourite cat GIF these days. While nowadays GIF is used mostly to share funny animations or clips, it’s still a useful format for keeping the file size of web graphics down.
Before you ask, no, we’re not going to get involved in the debate about how to pronounce GIF. Everyone knows it’s a hard G.
We really like this GIF of Dennis, head of sales, and Treena, Chief Experience Officer, partying hard at DrupalCon.
When you should use GIF:
- For animations.
- For small, transparent, low colour images like icons, buttons, or basic logos.
- When you need to keep file sizes small.
- When image quality is less critical than reduced file size.
- For sending funny cats to your friends.
PSD
Developed as the default file format for Adobe Photoshop files, PSD launched alongside the first version of Photoshop in 1990. While PSD files can’t be displayed in most browsers or desktop software, without them, digital graphics would be complicated. PSD allows for your image file to include features like layers, masks, transparency, spot colour, duotones, editable text, clipping paths, and much more. That being said, if you aren’t using Photoshop regularly, you might not come across this filetype out in the wild. I’m not going to lay out when and when not to use PSD, as their only real use is for creating editable graphics files that can be worked on again and again. Aside from actually opening and working on a PSD in Photoshop, there’s not a whole lot you can do with them.
When you should use PSD:
- When you’re working on original design files.
- Occasionally a printer, sign shop, or other vendors will request a PSD version of the file you want to print.
Vector Image Filetypes
NOTE: Unfortunately, Medium doesn’t allow articles to include images other than JPG, PNG, or GIF, so we can’t show you examples of vector graphics on this page. Sad trombone.
SVG
With an initial release date of September 4, 2001, this makes SVG the newest filetype in this list! The acronym SVG stands for Scalable Vector Graphics, which is like, sort of the whole point of vector graphics. As the name suggests, SVG is a scalable format (just like all other vector formats). This means that you can use a single image file but display it differently on different screens (think mobile vs. desktop), making it perfect for responsive sites. Supported by all modern web browsers, SVG has seen a rapid increase in usage in the past several years. While they’re not used all too often, SVG supports both animation and interactivity. While they’re radically different formats, SVG and PNG are frequently used in similar scenarios. In terms of file size, an SVG will typically be smaller than an identical PNG.
When you should use SVG:
- For icons, logos, or other relatively simple graphics you’re displaying on the web.
- When you need an image to be responsive and scale based on the size of the user’s display without any quality loss whatsoever.
EPS
The EPS format was developed by Adobe in the late 1980’s. Their team was looking to create a way of combining vector graphics, illustrations, text, as well as rasters (or bitmaps). The acronym EPS stands for Encapsulated PostScript, and it was developed as an extension of sorts to PostScript, another Adobe format. When EPS released, PostScript was being used extensively in printers, so it was a natural move to improve upon what was already becoming a standard. Later yet, the EPS would become the basis of another Adobe format, the .AI format. However, as EPS is an older format, vulnerabilities have been found. For instance, in recent years Microsoft has stopped supporting EPS embedding in their Office suite of programs, as malicious scripts could possibly be embedded straight within the EPS file.
When you should use EPS:
- Some print shops, sign shops, etc. may ask for an EPS version of your artwork as the final print-ready file.
- If you’re working in Adobe Illustrator, EPS can be used to share editable vector art files with people who use different vector graphics software.
On June 15, 1993, Adobe released the Portable Document Format or PDF. A PDF is more complicated than the previous formats, as they can contain raster and vector images, text, embedded fonts, and can remain editable after saving. This makes it extremely useful in the worlds of print and document design. While PDF files are typically used for text-heavy documents, you may encounter PDFs that are used as primarily working design files. One great feature of the PDF (depending on which program you’re using to view/edit them) is the ability to add digital signatures to the file. This makes them fantastic for sending business or legal documents over the net.
When you should use PDF:
- For downloadable documents like whitepapers, information ebooks/booklets, and the like.
- When you have official documents that need to be signed.
- When you’re sending final versions of files to a printer, sign shop, or some other sort of vendor.
That’s All, Folks!
Well, not all, but the basics, at least. There’s an abundance of other image formats out there, but now you’re an expert with the ones you’re most likely to see in your day-to-day.
If this all still seems a bit confusing, don’t worry. That’s normal.
That’s where we come in.
At Cheeky Monkey Media, our design and marketing monkeys have the knowledge and experience so that this sort of thing is second nature to them. We worry about the tiny nitty-gritty details of your design, marketing, or web project so that you can focus on the bigger picture of your business.
We want to chat.
Since you’re reading this article, we already know that you’re a pretty rad person. Did we mention that we really like working with rad people? Get in touch with us today on our website, follow us on Twitter, like us on Facebook, and check out our latest posts on Instagram.