When would you use an svg image instead of jpg or png in web design

This lesson is exclusive to members

Course contents
SECTION: 4
Project 2: Bike Repair Website 6:12:48
SECTION: 6
Project 4: Bootstrap Yogurt Website 3:35:39

Questions

You need to be a member to view comments.

Join today. Cancel any time.

Sign Up

Course info

128 lessons / 17 hours 5 projects Certificate of achievement

Overview

Hi there, my name is Daniel Scott and together we’re going to learn how to build professional responsive websites. which look good on mobiles, tablets and desktop screens.

We will build 4 sites together...
  • a simple but elegant restaurant website.
  • a bike repair website. 
  • a responsive portfolio website.
  • a Bootstrap website.  

We cover everything you need to build your first website. From creating your first page through to uploading your website to the internet. We’ll use the world’s most popular (and free) web design tool called Visual Studio Code.

There are exercise files you can download and then work along with me. At the end of each video I have a downloadable version of where we are in the process so that you can compare your project with mine. This will enable you to see easily where you might have a problem.

We will delve into all the good stuff such as how to create your very own mobile burger menu from scratch learning some basic JavaScript and jQuery. 

 You will...
  • Learn how to work with responsive images and icons. and stunning full screen background images and probably one too many gradients. 
  • Learn how to create forms and to choose great fonts for your website. 
  • Learn how to work with Bootstrap 4 to easily add carousels, cards and complex looking menus. 
  • Setup a domain name with hosting so that your website is live on the internet for others to see.  

There are fun class projects for you to work on which will enable you to practice what you learn. By the end of this course you’ll have a great understanding of important web design topics like HTML5, CSS3, Flex box, Responsive design and Bootstrap.   

If that all sounds a little too fancy - don’t worry, this course is aimed at people new to web design and who have never coded before. We’ll start right at the beginning and work our way through step by step. 

Who am I? 

I’m Dan, and I’ve been building websites for about 15 years now. I am award winning instructor, and have won a MAX Master award for the last 2 years in a row at the prestigious Adobe Max conference.

Time to upgrade yourself?
Sign up for the course and let’s learn how to build responsive websites.

Course duration 16 hours 42 mins
Daniel Scott

Daniel Scott

Founder of Bring Your Own Laptop & Chief Instructor

instructor

I discovered the world of design as an art student when I stumbled upon a lab full of green & blue iMac G3’s. My initial curiosity around using the computer to create ‘art’ developed into a full-blown passion, eventually leading me to become a digital designer and founder of Bring Your Own Laptop.

Sharing and teaching are a huge part of who I am. As a certified Adobe instructor, I've had the honor of winning multiple Adobe teaching awards at their annual MAX conference. I see Bring Your Own Laptop as the supportive community I wished for when I was first starting out and intimidated by design. Through teaching, I hope to bring others along for the ride and empower my students to bring their stories, labors of love, and art into the world.
True to my Kiwi roots, I've lived in many places, and currently, I reside in Ireland with my wife and kids.

Certificates

We’re awarding certificates for this course!

Check out the How to earn your certificate video for instructions on how to earn yours and click the available certificate levels below for more information.

Downloads & Exercise files

Download Exercise Files Download Completed Files

Transcript

Hey there, this video is going to be talking about the differences between JPEGs, PNGs, and SVGs. We'll even mention GIFs at the end. If you know all that you can skip on. We're not going to actually do anything in this class, a lot of me, talking and explaining, but if you've maybe never heard of an SVG, Scalable Vector Graphics, hang out, because this one is awesome. I'll show you an example, see, blurry PNG. Ah, really nice SVG, and it scales forever, watch, keep scaling in. Look how good he is. Let's jump in and figure all this out. 

Let's talk about the main image types, so JPEG, PNG, and SVG. So JPEG and PNG been around for a while. JPEG is probably the most common. So JPG, JPEG, whatever you want to call it. It is amazing for images like this; hi, Dan. Photographs do really well as JPEGs. Why? Because the file size is very small, in relation to the quality that you can get from it. So you can get something that looks really good, loads of colors, there's millions of colors in a jpg, but the file size in comparison is very, very small, so we use that. 

Where do JPEGs stop? And you're like, "So we would just use JPEGs for everything." The big trouble with JPEGs is that there's no transparency, you can't see through a JPEG. There's no way of having a hole in it to show things through, and that's where PNG starts. Now we'll look at our logo that we did. So this logo here, can you see, of Roar Bikes? It's actually an image, can you kind of see when I drag it around, it actually is see through. So I can change the color behind it and the color changes there. If this is a JPEG, pick a color for the background, and that would be it forever. 

So PNG is awesome, they have loads of colors as well. You can use millions of colors in a PNG, but it also has transparency. You might be saying, "Why don't we just use those?" Because the file sizes are huge for PNGs in comparison to a JPEG. So you got to do a trade-off, do I need transparency, if you do, then you have to leave JPEG behind. If you don't, like this image here, definitely a JPEG, because there's no transparency, so I might as well have all the goodness of the colors with the low file size. 

Now the third option, the SVG, is quite new. So if you haven't heard of this it's a Scalable Vector Graphic, and vector is the cool bit. So if you know about vector graphics you're going to go, "Really?" You can do vector online, you're just like, "You totally can." If you've never heard of vector before, you might search the term, it's vector, V-E-C-T-O-R. Because we won't cover it too much in here, but the benefit of it, as long as it's a really simple shape, like an icon or a logo, an SVG would be terrible for this, even if you wanted transparency, it will be terrible because there's just so much detail, but for simple shapes SVGs are brilliant. 

So logos here, we're going to switch this out for an SVG and look at the perks. So let's switch it out first and see the difference, and then we'll explain the perks for an SVG. So in your graphics, sorry, in your graphics? In your exercise files, so if you go to 'Exercise Files', 'Project2', There is our line, PNG, that we used earlier on. We're going to use this one called SVG, copy it, go to your Desktop, put it in your Project2 folder, in your images, and paste it in. Now in your code, go to Visual Studio Code. Here, under your Image tag, in your Logo div, switch out PNG for SVG. Let's have a little look at the difference.
 
So this is the original one, and get ready, look at the second one, ready, ooh, crisp and clear. So if you're working, you're obviously watching this video, sometimes, depending on your internet, sometimes people will write comments in the bottom, like, "It looks the same." You might be looking at a really low resolution of the video. Often if you check in the bottom right of your video you can like, raise or lower the quality of the video that you're watching, just so that you can see these details but let's make it a bit more obvious. So I can zoom in, so if I zoom in on this one, I'm holding 'Command +', hitting it a couple of times, that's on a Mac, 'Ctrl +' on a PC. 

I'm just zooming into my website, so that you can kind of see the real big difference. So a PNG uses pixels, to make its graphic, and while it was really small it was fine, had a slightly blurry edge, but vector, this SVG, it scales to infinity. You can scale it as big as you like, and the cool thing about it, is that it will always be crisp and clear on the outside, and still have a very small file size. You could get a PNG looking really good at this size, you could make it bigger and make it great, but the file size is going to get really, really big. 

So you'll find lots of websites now using SVGs. Browser compatibility is really good now, so if it's an icon or a logo, use an SVG, that's a good kind of blanket rule. If it's say an image, I'll show you a good example. So this one here, this is a graphic I made for a later part of the class, and let's say I want it to look exactly like this. My giant weird Meat Yoghurt that I made for you guys, but it's got a background color. This would work best as a JPEG. I'll show you how to export all these in a second, but let's understand them first. 

So this would work great as a JPEG because it's got lots of colors in here, and it's reasonably photographic, and the file size will be nice and small, but let's say I need it to have empty background, this little checker board things. The computer's way of saying there's nothing behind it. So this would have to be a PNG. Why wouldn't it be an SVG? An SVG needs that really simple details, if this was an SVG it just, file size would be huge and it would look terrible, and it just wouldn't work, I can't make this an SVG. So an SVG, perfect for this type of thing when there is like really simple lines. 

So anything done in Illustrator can be exported as an SVG, because that's really basic. Basic shapes, simple colors, easy. JPEGs for images, PNGs for images that need transparency, and anything that is really simple lines, like icons and small little graphics, arrows, that sort of thing, would be perfect for an SVG. You're like, "Has he mentioned GIFs?" GIFs, the only reason you use GIFs these days, if you need to animate them. GIFs have a real big drawback as in the-- they only have 256 colors, which is a pain. 

So you only can do small things, and the colors can't be too broad, and just there's no reason to use it unless you want to animate it. And even then, animating GIFs, a really niche kind of use case. You can animate in CSS and lots of other better ways. So I'm not going to cover GIFs here. I do cover it a lot more in my other, say Photoshop and Illustrator classes. We make all sorts of animated GIFs there, but we're not going to use a kind of traditional Web Design now. What I'll do is, now you understand the stuff, I might actually shift the next part of this video to another video, so that you can just watch that nice and by itself. So later on you can come back, just show you how to kind of export these SVGs, PNGs, and JPEGs easily. So let's do that in the next video.
  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • © Bring your Own Laptop Ltd 2024