The WordPress Media Library is like the storage room for all the visuals and files on your site. Anytime you upload a photo, video, audio clip, or even a PDF, WordPress automatically keeps it organized in this central hub. Think of it as your website’s “photo album and filing cabinet” in one.
Inside the Media Library, you can:
- Upload and store files: Drop in new images or documents that you’ll use in posts and pages.
- Organize: Search by file name, filter by date, or view everything in either a list or grid.
- Edit: Crop, resize, or rotate images without needing extra software.
- Reuse: Instead of uploading the same image multiple times, you can grab it from the Library whenever needed.
This setup saves time and keeps everything in one place. For example, if you upload a company logo once, you can use that exact file across your homepage, blog posts, and footer—without worrying about duplicates.
Transcript
What is the media library?
Media consists of the images, video recordings, and files that you upload and use on your site. And of course, media is inserted into pages and posts. I also think you’ll agree that media plays a crucial role in enhancing a website’s overall experience and effectiveness. You can add various types of media to your library, from photos, screenshots, audio, PDF documents, spreadsheets, PowerPoint presentations, and more.
Navigating the media library
When you open your media library, it will open to the default grid view. In the grid view, thumbnails of images, audio icons, etc, are all arranged in a grid structure. 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. 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, only to see audio files. Or documents, like a PDF. Or even spreadsheets. And then, of course, you can 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 at the top right, for example, using words from the description or file name. In this case, I would like to see all my shoe-related images done with a simple search. You can also view your media in List View. All your media will be listed below each other in List View, as the name implies. You will also be able to see the file name and type of file, 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.
Adding media from the media library
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 YouTube or Video blocks, as it will save space in your media library and for better performance.
Editing media
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 always to 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 can crop the image, scale it, or resize it for image optimization. The dimensions update automatically once you change the height or the width. And don’t worry; 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.
Image optimization
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 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, 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.
Image optimization
Transcript
Advantages
Before proceeding, let’s briefly discuss the advantages of image optimization. Image optimization will help you improve page loading speed, user experience, and SEO, and it doesn’t require any development skills. Image optimization clearly has a domino effect. If your images load quickly, they will increase user engagement and then lead to improved search engine rankings.
File name and alt text
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. Then, we can scale or crop an image and compress the image file. So make sure you change the file name of an image before uploading it to your media library. Remember to add the alt text. When you add an image to your media library, you can open it up, and at the 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 crawl better and rank your website and helps visually impaired users understand the content of a page. It is also important to note image SEO starts with the file name. You want a search engine to know the image without looking at it. So use a focused key phrase.
Image format
WordPress lets you upload images in several formats. Images are usually saved as JPEG, PNG, WebP or AVIF. JPEG is typically used for photographs and images of people and objects. PNG is suitable for graphics, illustrations, and images with transparency, while WebP and AVIF are excellent choices for optimizing website performance, especially for non-vectorized assets like photos and animations due to their superior compression capabilities. I would also recommend avoiding GIFs as they present accessibility challenges.
Plugin
Lastly, we are going to look at three methods to optimize images. Firstly, you can use a WordPress plugin, or you may decide to use a web-based tool or an image editor. Let’s start with plugins. To add a plugin, let’s make our way to Plugins, click on Add New, and then type “Image optimization” in the search block. Now you will notice there are many different plugins to choose from. Some plugins worth exploring are Modern Image Formats, Image Optimization by Optimal, Smush, or Imagify. Please note that depending on the plugin, some features might only be supported by the Pro version. You might want to consider using modern image formats for new image uploads on your site. This plugin has been created and is managed by the WordPress performance team. It converts images to more modern formats such as WebP or AVIF during upload. I will install and activate the EWWW Image Optimizer plugin in this example. Once activated, we can go to Settings and see an option that says “Optimize Local Images”. And if you scroll down, you will see more options with the premium package. But if we make our way to media, we can click Bulk Optimize and scan for unoptimized images. We can see we have 184 images to optimize, and more options are on the right.
Web-based tools
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 Squoosh works. It’s open source and supports all image formats. Once you add an image from your computer, you can edit or compress it. Firstly, I will click on Resize and then change the height of the image. You will notice the width automatically updates. Next, I will go to Compress and save the image as a WebP file. In the bottom right, we can see that this file size has been reduced by 97%.
Image editors
Finally, you also have the option to use image editors such as Pixlr, Photopea, Gimp, or Canva.
Optimal size
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 around 1024 by 768 pixels.