In this lesson, we will delve deeper into the media library.
We will learn to navigate and manage the media library, add ALT text and also understand the importance of optimizing images.
Media consists of the images, video recordings and files that you upload and use in your site.
And of course, media is inserted into pages and posts.
I also think you'll agree, media plays a crucial role in enhancing the overall experience and effectiveness of a website.
You can add various types of media to your library, from photos, screenshots, audio, PDF documents, spreadsheets, PowerPoint presentations and more.
When you open your media library, it will open to the default grid view.
And in the grid view, thumbnails of images, audio icons etc are all arranged in grid structure.
And here you are able to filter through your media to find what you are looking for.
At the top, next to the grid view icon, you can filter your media by media type and date.
The All media items drop down allows you to select by the types of media, such as images, audio, video, documents and even spreadsheets.
You can also view any media that is unattached to any posts or pages.
And this means the media is in your media library, but you haven't used it anywhere on your site.
Let's use the filtering option, for example, to only see audio files.
Or documents, like a PDF.
Or even spreadsheets.
And then of course, you can just go back to seeing all media items.
Next, the All dates drop down allows you to view images based on their upload dates.
You can quickly find media you have uploaded in a specific month, or you may choose to view all.
When you click on Bulk select, you can delete media simultaneously.
You can also search for media using the search block top right, by for example using words from the description or file name.
In this case, I would like to see all my shoe related images, all done with a simple search.
You can also view your media in List View.
In List View, all your media will be listed below each other, as the name implies.
And you will also be able to see the file name and what type of file it is, for example a PDF or JPEG.
To add media to your library, click on Add new media file in the sidebar or at the top.
Once selected, you will be able to drag and drop single or multiple files into the page, or use the select files option.
When you add media to a page or a post using the Image block or the Gallery block for example,
you will be able to upload images directly from your computer into your post or page and media library, or directly from your media library.
When it comes to larger videos, it's better to embed them via the YouTube block or the Video block, as it will save space in your media library and for better performance.
When you open an image, you will be able to add attributes such as alternative text, the title, a caption and a description.
It is important to always add ALT text to an image.
The ALT text is a concise description of an image for users who can't view the image, and it's also good for your site's SEO or your site's search engine optimization.
Adding a description also enhances SEO and allows for better organization and understanding of the image's purpose or content.
When you click on Edit image, you will be able to crop the image as well as scaling it or resizing it for image optimization.
The dimensions update automatically once you change the height or the width.
And don't be concerned, when you select Restore original image, you can restore the image to its original format.
You also have the option to rotate or to flip the image.
To end off, let's briefly talk about image optimization.
It is advised to optimize images before uploading them to your media library, to improve page load speed and save service space.
You can use web-based tools to achieve this, for example sites like TinyPNG, Bulk Resize or Squoosh.app to only name a few.
Remember to save images with a descriptive and relevant file name before adding it to your media library.
It helps search engines understand the content of the image, contributing to better SEO.
Search engines may use file names as a factor when indexing and ranking content.
Another option is to use an image optimization plugin.
There are various image optimization plugins available to choose from when you search the plugins directory.
When you find the plugin that suits your needs, you can install and activate and follow the necessary steps.
Both of these methods, using a web-based tool or plugin, improve overall performance by compressing images without compromising visual quality.
All the best as you use the media library to elevate your site to the next level.