Lesson 11 of 50
22% Complete
22%

WordPress Media Library

In this lesson, you will learn how to upload, organize, edit, and insert images and other media files into your WordPress website.

Learning Objective: Learn to use the Media Library, upload images, edit image details, add alternative text, and insert media into posts and pages.

1. What Is the WordPress Media Library?

The Media Library is the section of WordPress where uploaded files are stored and managed. These files can be used in posts, pages, and other parts of your website.

Common media file types include:

  • Images: JPG, JPEG, PNG, GIF, and WebP
  • Documents: PDF and other supported document formats
  • Audio: MP3 and other supported audio formats
  • Video: MP4 and other supported video formats

Supported file types and upload size limits depend on your WordPress configuration, hosting server, and security settings.

2. How to Open the Media Library

  1. Log in to your WordPress admin dashboard.
  2. Find Media in the left sidebar.
  3. Click Library.
  4. View the media files already uploaded to your website.

The Media Library lets you view uploaded files in grid or list format, depending on the available view options.

3. How to Upload Media Files

Follow these steps to upload a new image or document:

  1. Open Media → Add New Media File.
  2. Click the file selection or upload area.
  3. Select a file from your computer.
  4. Wait for the upload to finish.
  5. Confirm that the file appears in the Media Library.
Example

Suppose you are creating an About Us page for Soopro Pathshala.

  1. Prepare a suitable institute image.
  2. Upload the image to the Media Library.
  3. Add appropriate alternative text and a title.
  4. Insert the image into the About Us page.
  5. Preview the page to check the image.

4. Upload Media While Editing a Page

You do not always need to open the Media Library separately. You can upload an image directly while editing a post or page.

  1. Open a post or page in the WordPress editor.
  2. Click the plus (+) button to add a block.
  3. Choose the Image block.
  4. Select Upload to choose a file from your computer.
  5. Alternatively, choose an existing image from the Media Library.
  6. Adjust the image settings if required.
  7. Save or update the post or page.

5. Understanding Media Details

When you select an uploaded file in the Media Library, WordPress displays information about the file and may provide fields that you can edit.

Field Purpose
File Name The name of the uploaded file.
Alternative Text (Alt Text) Describes an image for accessibility and can help search engines understand it.
Title A label used to identify the media item in WordPress.
Caption Text that can be displayed with an image when supported by the block or theme.
Description Additional information about the media file.
File URL The web address used to access the uploaded file.

6. What Is Alternative Text?

Alternative text, often called alt text, describes the content or purpose of an image. Screen readers can use it to communicate image information to people who cannot see the image.

Example image: A teacher teaching students in a computer lab.

Suitable alt text:

Teacher explaining computer programming to students in a computer lab.

Good alt text should:

  • Describe the meaningful content of the image.
  • Be concise and relevant to the image's purpose.
  • Avoid unnecessary keyword repetition.
  • Not begin with phrases such as "Image of" unless needed.

Decorative images that add no meaningful information can generally use empty alt text when implemented appropriately.

7. How to Edit Image Details

  1. Open Media → Library.
  2. Select the image you want to edit.
  3. Find the available attachment details.
  4. Update fields such as alt text, title, caption, or description.
  5. Save the changes if the interface provides a save option.

Changing an image's title or alt text does not automatically change every separate use of that image across your website. Check individual posts and pages when necessary.

8. Basic Image Editing

WordPress provides basic image-editing options for supported images. Depending on your version, you may be able to crop, rotate, or flip an image.

To check the available options:

  1. Open the Media Library.
  2. Select an image.
  3. Open its attachment details or image-editing screen.
  4. Choose an available editing option.
  5. Apply the change and save it if required.

For advanced editing, such as complex background removal or detailed graphic design, use a dedicated image-editing tool.

9. Image Sizes and Optimization

Large images can increase page loading time. Preparing suitable image dimensions and compressing files can improve website performance.

Practice Benefit
Resize images before uploading Avoids unnecessarily large dimensions.
Compress images Reduces file size and can improve loading speed.
Use suitable formats Can balance image quality and file size.
Use descriptive file names Makes files easier to identify and manage.
Add appropriate alt text Improves accessibility and explains meaningful image content.

10. What Are WordPress Image Sizes?

WordPress can generate different image sizes when an image is uploaded. Themes and blocks may use these sizes for thumbnails, blog listings, or larger displays.

Common image-size names include:

  • Thumbnail
  • Medium
  • Large
  • Full Size

The dimensions and available sizes depend on WordPress settings, the active theme, and any plugins that register additional sizes.

11. How to Delete a Media File

To remove an uploaded file:

  1. Open Media → Library.
  2. Select the file you want to remove.
  3. Find the delete option in the attachment details.
  4. Review the confirmation message.
  5. Confirm deletion if you are sure.
Warning: Deleting a media file can break images or links that use it in posts, pages, or other parts of your website. Check where the file is used before deleting it.

12. Media Library Best Practices

  • Use clear and descriptive file names.
  • Upload images at appropriate dimensions.
  • Compress images before uploading when practical.
  • Add meaningful alt text to informative images.
  • Use captions when visitors need additional context.
  • Remove unused files only after checking where they are used.
  • Keep a backup of important website media.
  • Upload only files you have permission to use.

13. Practical Assignment

Task: Manage Website Images
  1. Log in to your WordPress dashboard.
  2. Upload three images to the Media Library.
  3. Use descriptive file names for your images.
  4. Add suitable alt text to each informative image.
  5. Add a caption to one image.
  6. Insert one image into an existing page.
  7. Preview the page and check the image display.
  8. Review the image dimensions and file size.
  9. Identify one image that could be optimized.

14. Lesson Summary

  • The Media Library stores and manages uploaded media files.
  • You can upload media from the dashboard or editor.
  • Media details include alt text, title, caption, and description.
  • Alt text helps communicate meaningful image content.
  • Image optimization can improve website performance.
  • WordPress can generate multiple image sizes.
  • Deleting a file may affect content that uses it.

Lesson 11 Quiz: Media Library

Select the correct answer for each question.

1. What is the main purpose of the WordPress Media Library?

2. What is the purpose of alt text?

3. What should you check before deleting a media file?