 Welcome to Learn WordPress. Today's session is all about image optimization. But you might be asking, what is image optimization? Image optimization maintains the balance of image quality while reducing file size. It is the process of delivering high quality images in the ideal format, size and resolution to increase user engagement. It also involves accurately labelling images so search engines can read them and understand page context. Before moving forward, let's briefly talk about the advantages of image optimization. Image optimization will help you improve page loading speed, the user experience, SEO and it doesn't require any development skills. Image optimization clearly has a domino effect. If your images load quickly, it will increase user engagement and then lead to improved search engine rankings. So how do we optimize images? Firstly, we need to change the file name of an image before uploading and then add alternative text. Secondly, make sure you choose the correct image type. And then we can also scale or crop an image and lastly compress the image file. So make sure you change the file name of an image before uploading it to your media library and remember to add the alt text. When you add an image to your media library, you can open it up and top right it says alternative text. The alt tag is simply a brief text description of an image but it explains the content of images to website users when a graphic can't be loaded. It also allows search engines to better crawl and rank your website and it also helps visually impaired users to understand the content on a page. It is also important to note image SEO starts with the file name. You want a search engine to know what the image is without even looking at it. So use a focused key phrase. Wordpress lets you upload images in several formats. Most commonly images are saved as JPEG, PNG or GIF. JPEG is usually used for images of people and objects. PNG is a good option for graphics and illustrations and GIF is best suited for animations. Lastly, we are going to look at four methods to optimize images. Firstly, you can alter images using your media settings. Secondly, you can install a WordPress plugin or you may decide to use a web-based tool or image editing software. Before we look at how to edit an image within the media library, let's make our way to settings and click on media. Keep in mind that WordPress saves four different sizes of an image when you upload it to the media library. The original size will keep its dimensions and the other three sizes listed below will not exceed the maximum heights set. And I will show you how this works when we go to one of the pages that I've created. I've added the same image three times with the sizes that WordPress provides. The thumbnail, medium size and the large size. And if you click on image size in your sidebar settings, you will see there's also a fourth option, full size. Now if we would like to optimize this image, we need to make our way to the media library. Open the image. Firstly, you will notice that the file type is JPEG. And secondly, I've already added the alt text. Then we will also notice the file size is 432 kilobytes and the dimensions are 2,560 by 1,708 pixels. To edit the image, click on edit image below. And now we can go ahead and scale the image top right. Once you've entered your new dimensions, click on scale. Now we can return to view the details of the image. And we will notice that the file size decreased and the dimensions display the new dimensions we set. If we go back to edit the image and we're not happy with the changes, we can click on restore original image. And it will discard any changes made. Another option you have is to crop the image. And once cropped, we can save. And now we will notice the file size and the dimensions have updated. Secondly, you may wish to use a WordPress plugin that does all the work for you. To add a plugin, let's make our way to plugins. Click on add new. And then type image optimization in the search block. And now you will notice there are many different plugins to choose from. Some plugins worth exploring are Imageify, Image Optimization and Lazy Load by Optimal, Smush or EU Image Optimizer. I'm going to go ahead and install and activate the EU Image Optimizer plugin. And once installed, we can go to settings, select speed up your site. And in this case, I will continue with the free mode. Then there are recommended settings. Number one is remove metadata. This will remove extra information about the image. And Lazy Load is a really cool setting where Page only loads the section being viewed and delays your other resources from populating until they are needed. And when you are ready, click save settings and done. Now we can head back to the media library and click on the list view. Here you have the option to optimize images one by one that's already been uploaded to your site before you installed the plugin. Or if you click on bulk optimize, you have the option to update all your images simultaneously. But please note, at the top it says bulk optimization will alter your original images and cannot be undone. Please be sure you have a backup of your images before proceeding. But what happens if you upload a new image after you've installed the plugin? Well, let's add a new image. And when the image has been uploaded, you will notice it has already been compressed and optimized without doing anything. So the right plugin optimizes images on your behalf. Next, let's explore some web-based tools where you can optimize the image before uploading it to your WordPress site. Some options worth considering are tinypng.com, tinyimg.com, kraken.io and squoosh.app. Let's see how tinypng.com works. Upload the image from your computer, and once uploaded and compressed, you will notice that the file size has been reduced by 59%. Finally, you also have the option to use image editors such as Adobe Photoshop, GIMP or Preview, which is built into Mac OS. You might be asking what is an optimal size for use in WordPress? Well, it depends on how you will use that image. 1200 by 628 pixels is a good size for header images. For other images, an optimal size is at least 640 by 480, and up to around 1024 by 768 pixels. I trust this information has been helpful and that you will find the right method that works for you. Visit Learn WordPress for more tutorials and training material.