Imagine sending email by typing in MS Word and sending the message over as a screenshot. Seems silly, right? But for many web designers, artists, and bloggers, that’s been our situation when designing vector graphics. You could compose scalable icons, but would need to export them as raster images for websites. Many logos were originally created in Illustrator, but then designers crop them and save them as .JPGs and .PNGs for web destinations. Resizing and/or changing a color became an entire process that started with going back to the source file, which is the MS Word document in my email analogy. You would make the desired changes, output the series of images, and re-upload all those files to your server.
Thankfully, that’s all changed. While scalable vector graphics (SVG) were introduced in 2001, only recently has the image format displayed consistently on the web, leading me to the first reason why the SVG format is kicking data and taking names.
Why SVGs are made of dreams
1) SVGs are widely supported
2) SVGs are speedy
SVGs are generally small in file size, and thus download faster than raster images. Also, inline SVG code can be placed in HTML directly and cut down on server requests. You need millions of pixels to fill a screen with a digital photograph on common-sized monitors, while you can make colorful full-screen SVG backgrounds with a fraction of the file size.
3) SVGs scale perfectly
They’re scalable – it’s in the name. With responsive design becoming the new norm over the last ten years, websites need to consider various screen sizes. Graphics that scale automatically are a welcome tool on the web for this very reason. Raster graphics —think JPGs, PNGs, and GIFs— on the other hand, cannot scale bigger without becoming blurry. And even though you can shrink photos on websites decently, your browser is downloading an image at the bigger than necessary file-size.
4) SVGs are high resolution
They look great at any resolution, and that’s important as higher-resolution devices become more popular. Your computer lacks the fictional CSI software that can zoom into images beyond their resolution without pixelation or getting blurry. Raster photos are composed of colored squares within a grid, unlike SVGs which are calculated through math to fit the current screen resolution.
5) SVGs can be styled through CSS
CSS is the way to style websites, and it is more powerful than ever. You can even style raster images, though effects target the entire image and may not be very practical. Like, how many websites really need to display an inverted image or change the hue? Blurs, opacity, sepia, grayscale, and brightness may have a place, though it is more common for designers to style elements around image, such as a colorful image overlay. SVGs on the other hand are written in XML and that means you can target bits and pieces that make up the entire SVG. You can change the color of an icon or re-position the direction of an arrow within an icon. You could hide and show reusable vector stars as part of a rating system. You can place many of these properties on mouse hovers for easy animations, which brings us to the next point…
6) SVGs can be animated
Raster images can look impressive, but unless you delve into video or gifs that come with large file sizes, animating digital photos is limited. Unlike raster images, SVGs are made up of smaller parts that can be manipulated. Picture a simple smiley face. In the SVG format, there would likely be a yellow circle for the head, perhaps two black circles for eyes, along with a curved line for a mouth. You could target any of those shapes to animate, and could make an eye wink by simply decreasing its height.
A more practical use is animating company logos. Many years ago, you were limited in hover effects. If a website visitor hovered over a logo, perhaps using a transparent .png logo, you could animate the background changing color. Now, with SVG, you can spin the logo mark, while changing letter color in delayed succession, and increasing the logo’s overall size.
7) SVGs can be rearranged easily
When preparing images for the web, the dimensions are often determined by the destination. Sometimes one website will want your image as a square – like Instagram – while others require portrait or landscape orientations. With raster images, you may have to crop images in ways that hide certain elements. However, with vector graphics, you can simply re-position and re-size elements around varying dimensions.
If you download free stock photographs and free vector graphics, you can make color edits to match your company branding. With vector graphics, you can do it with the click of a button, but with raster images, you have to work to recolor section by section.
8) SVGs support transparency
Not all raster formats allow transparency, and those that do come with some drawbacks liked jagged edges with .GIF or hefty file-size with PNG. Transparency works well with SVGs, and is one of the main reasons I use SVGs for company logos on websites. It allows simple hover effects for the background of the logo. Transparency is a great way to break away from rectangular graphics and blocky websites.
It is easy to see, transparency is great.
9) SVGs are great for readability
How common are hero images? Hero images are those full-screen images (or videos) that welcome visitors on websites, especially on homepages. Often, text appears over the visual, and even though it’s usually large and bold, sometimes readability is sacrificed in the name of hip visuals. SVGs integrate into websites in a way that doesn’t force designers to place text over them. Photographs come with boundaries, whereas you can simply pull specific elements of imagery onto the webpage in a way that you can’t with photographs.
Regardless, for a fair comparison, let’s assume the imagery takes up the whole screen whether as a raster or vector graphic. In either case, there are certain visual choices that can help or hurt readability. You obviously shouldn’t put white text over very light imagery. You also shouldn’t place thin or intricate fonts over imagery that has varying jumps of high contrast, such as text over a bare tree. This last point is where SVG shines. Photography comes with fine details, noise, and uneven contrasts that are not ideal to overlay with text. SVGs, however, often use flat design and solid colors, which are more suitable behind text. With responsive design, text over images doesn’t always line-up consistently from device to device, so it is important that background visuals contain less noise.
10) SVGs stand out
In a world where seemingly everyone carries around a device that hosts TWO camera lenses, photographic imagery is widely used on amateur and professional websites alike. Everyone has access to free professional-grade photographs at their finger tips. There’s also Google images for those with no moral compass or fear of lawsuit. Photographs are more commonly used on websites than vector graphics, so if you’re after a more unique look, you can give your customers a visually memorable experience with custom SVGs tailored to your business.
There are reasons most logos are designed with vector editing software like Adobe Illustrator. Great logos distill a complex concept into an easily understandable visual mark. Vector graphics can send a visual message with precision – cutting the background noise and blurry interpretation that often comes with photography.
SVGs are scaleable, small in file-size, high definition, well-supported, and great for readability. They can also be customized, styled through CSS, animated, transparent, translucent or opaque, and the perfect way to standout from competition. SVGs are awesome, but not perfect. Unlike Franks Red Hot Sauce, you might not what to put that on everything. SVGs aren’t suitable in every situation. Because they’re not 100% compatible in email yet and they often have a highly illustrative style, SVGs may not be right for every brand’s website. That said, this visual format is an underutilized powerhouse that is finding its place across the internet. SVGs have won my heart. They will soon win your heart too.