Paramclasses Academy - Blog

Tutorials Details

←
Post 11 of 40
→

How to use WordPress Media Library: Upload and Optimize Images ?

How to use WordPress Media Library: Upload and Optimize Images ?

November 13, 2026

1. Introduction

Images play an important role in website design and content presentation. They make articles more engaging, explain concepts visually, and help visitors understand information.

WordPress provides a built-in feature called the Media Library to upload, store, organize, edit, and manage images and other media files.

Whenever you upload an image through the WordPress Dashboard or directly through the Block Editor, WordPress stores it in the Media Library.

However, uploading an image is not enough. Images should also be optimized to maintain good visual quality while reducing unnecessary file size.

In this tutorial, we will learn how to use the WordPress Media Library and optimize images for a professional website.

2. Learning Objectives

After completing this tutorial, you will be able to:

  • Understand the WordPress Media Library.

  • Upload images and other supported files.

  • Switch between Grid View and List View.

  • Search and filter uploaded media.

  • Edit image title, alternative text, caption, and description.

  • Crop, rotate, and scale images.

  • Understand image formats such as JPEG, PNG, WebP, and AVIF.

  • Understand thumbnail, medium, large, and full-size images.

  • Configure Media Settings.

  • Optimize images before uploading them.

  • Use responsive images effectively.

  • Manage and delete unnecessary media files.

3. Prerequisites

Before starting, make sure you have:

  • A working WordPress installation.

  • Access to the WordPress Dashboard.

  • Administrator or appropriate media-management permissions.

  • A few sample images in JPG, PNG, or WebP format.

  • An image editor or image-compression tool.

You can practise using a local WordPress installation created with XAMPP or a live hosting server.

4. What Is the WordPress Media Library?

The Media Library is a built-in WordPress feature used to manage uploaded media files.

It stores files such as:

  • Images

  • Videos

  • Audio files

  • PDF documents

  • Other supported file types

You can access it from:

Dashboard → Media → Library

The Media Library allows you to:

  1. Upload new files.

  2. View existing media.

  3. Search for uploaded files.

  4. Filter media by type and date.

  5. Edit image information.

  6. Copy media file URLs.

  7. Delete unwanted files.

  8. Select images while creating pages and posts.

WordPress normally stores uploaded files inside the following directory:

wp-content/uploads/

Depending on the upload organization setting, WordPress may create folders based on the year and month.

Example:

wp-content/
    uploads/
        2026/
            11/
                wordpress-dashboard.jpg
                website-design.png

The actual folder structure depends on your website configuration.

5. How to Open the WordPress Media Library

Follow these steps:

Step 1: Log in to the WordPress Dashboard.

https://yourdomain.com/wp-admin

Step 2: Locate Media in the left sidebar.

Step 3: Click Library.

Step 4: The Media Library will display your uploaded files.

You can also use:

Dashboard → Media → Add New Media File

to upload new files.

6. Understanding Media Library Views

WordPress commonly provides two ways to display uploaded media.

6.1 Grid View

Grid View displays media files as thumbnail previews.

It is useful when:

  • You want to visually identify images.

  • You want to select an image for a post.

  • You want to browse a large collection of photographs.

  • You want to open image details quickly.

6.2 List View

List View displays media files in rows with additional information.

Depending on the installation, it may show:

  • File name

  • Author

  • Uploaded to

  • Date

  • File type

  • Other media details

It is useful when you want to manage files using their names and information.

6.3 Switching Between Views

Follow these steps:

  1. Open Media → Library.

  2. Locate the view controls near the top of the screen.

  3. Click the Grid View icon.

  4. Click the List View icon to switch back.

The available layout and controls may vary slightly across WordPress versions.

7. How to Upload Images to the Media Library

Now let's upload an image.

Step 1: Open:

Dashboard → Media → Add New Media File

Step 2: You will see the file-upload area.

Step 3: Click Select Files.

Step 4: Choose an image from your computer.

Example:

wordpress-tutorial.jpg

Step 5: Wait for the upload to finish.

Step 6: Open Media → Library.

Your uploaded image should now appear in the Media Library.

7.1 Upload Images Using Drag and Drop

WordPress also supports drag-and-drop uploads on the upload screen.

  1. Open Media → Add New Media File.

  2. Open the folder containing your images.

  3. Select the required image.

  4. Drag it into the WordPress upload area.

  5. Wait for the upload to complete.

You can upload multiple supported files together.

7.2 Upload Images Directly Through the Block Editor

You do not always need to open the Media Library separately.

Follow these steps:

  1. Open Posts → Add New Post.

  2. Click the plus (+) button.

  3. Search for Image.

  4. Select the Image block.

  5. Choose Upload.

  6. Select an image from your computer.

WordPress uploads the image to the Media Library and inserts it into your content.

You can also select an existing image from the Media Library.

8. Understanding Image Details

When you select an image in the Media Library, WordPress displays its attachment details.

Depending on the view and WordPress version, you may see:

  • File name

  • File type

  • File size

  • Image dimensions

  • Upload date

  • Uploaded by

  • Uploaded to

  • Alternative Text

  • Title

  • Caption

  • Description

  • File URL

Let's understand the most important image fields.

8.1 Alternative Text (Alt Text)

Alternative text describes the meaningful content or purpose of an image.

It helps screen-reader users understand images and provides replacement information when an image cannot be displayed.

Example:

wordpress dashboard showing the media library

Good alt text should:

  • Describe the actual image.

  • Be concise and meaningful.

  • Include important visual information.

  • Avoid unnecessary keyword repetition.

  • Not begin with phrases such as "Image of" unless they add useful context.

For decorative images that do not convey meaningful information, an empty alternative text is often appropriate.

8.2 Title

The title identifies the media item in WordPress.

Example:

WordPress Media Library Dashboard

It can help administrators identify files when managing media.

8.3 Caption

A caption is a short text associated with an image.

Example:

WordPress Media Library displaying uploaded images.

When you insert an image into a post, its caption can be displayed beneath it.

8.4 Description

The description provides additional information about the media file.

Example:

A screenshot showing the WordPress Media Library
with uploaded images and file-management controls.

Its public display depends on the theme and how the attachment is used.

8.5 File URL

The File URL is the direct address of the uploaded media file.

Example:

https://example.com/wp-content/uploads/2026/11/wordpress-dashboard.jpg

You can use the URL when linking to or referencing the media file.

Important: Do not expose private or sensitive documents through publicly accessible media URLs.

9. How to Edit Image Details

Follow these steps:

Step 1: Open Media → Library.

Step 2: Click the image you want to edit.

Step 3: Open the image's attachment details or Edit Media screen.

Step 4: Update the available fields:

Title: WordPress Dashboard

Alternative Text:
WordPress admin dashboard showing media management options

Caption:
Managing images using the WordPress Media Library

Description:
A reference image showing the WordPress media management interface.

Step 5: Save or update the changes.

The exact save controls depend on whether you are editing the image in the attachment details panel or the separate Edit Media screen.

10. How to Edit Images in WordPress

WordPress includes basic image-editing tools.

Depending on the image format and WordPress interface, you can use tools such as:

  • Crop

  • Rotate left

  • Rotate right

  • Flip vertically

  • Flip horizontally

  • Scale image

10.1 How to Crop an Image

Cropping removes unwanted areas from an image.

Follow these steps:

  1. Open Media → Library.

  2. Select an image.

  3. Click Edit Image.

  4. Select the Crop control.

  5. Select the area you want to keep.

  6. Apply the crop.

  7. Save the changes.

Example:

Suppose an image has dimensions:

1920 × 1080 pixels

You want to crop it into a square thumbnail.

The target dimensions can be:

500 × 500 pixels

The crop area should be selected carefully to retain the important subject.

10.2 How to Rotate an Image

If an uploaded photograph has the wrong orientation:

  1. Open the image's Edit Image screen.

  2. Click Rotate Left or Rotate Right.

  3. Review the result.

  4. Save the changes.

10.3 How to Flip an Image

You can flip an image horizontally or vertically.

  • Horizontal flip: Reverses the image from left to right.

  • Vertical flip: Reverses the image from top to bottom.

Use this feature only when the resulting image still represents the intended subject correctly.

10.4 How to Scale an Image

Scaling changes the image dimensions.

Example:

Original image:

4000 × 3000 pixels

Scaled image:

2000 × 1500 pixels

Scaling can reduce the image dimensions while maintaining its aspect ratio.

Avoid enlarging small images unnecessarily because this can reduce visual quality.

11. Understanding WordPress Image Formats

Selecting the correct image format is an important part of image optimization.

11.1 JPEG / JPG

JPEG is commonly used for photographs and realistic images.

Advantages:

  • Good compression.

  • Suitable for photographs.

  • Usually smaller than an equivalent uncompressed image.

Limitations:

  • Does not support transparency.

  • Repeated lossy editing can reduce image quality.

Common extension:

.jpg
.jpeg

11.2 PNG

PNG is suitable for graphics, logos, icons, and images requiring transparency.

Advantages:

  • Supports transparency.

  • Preserves sharp edges and graphic details.

  • Useful for screenshots and interface elements.

Limitations:

  • Can produce larger files than JPEG for photographs.

Common extension:

.png

11.3 WebP

WebP is a modern image format designed to provide efficient compression.

Advantages:

  • Supports lossy and lossless compression.

  • Supports transparency.

  • Often provides smaller files than comparable JPEG or PNG images.

Common extension:

.webp

11.4 AVIF

AVIF is a modern image format that can provide efficient compression and high visual quality.

Advantages:

  • Efficient image compression.

  • Supports transparency.

  • Can be useful for performance-focused websites.

However, server support, browser compatibility, image-processing capabilities, and WordPress configuration should be checked before adopting it.

Common extension:

.avif

11.5 Which Image Format Should You Use?

Image Type Recommended Format
Photographs JPEG or WebP
Transparent logos PNG or WebP
Simple graphics PNG or WebP
Website screenshots PNG or WebP
Performance-focused photographs WebP or AVIF
Animated images GIF or an appropriate modern alternative

Choose the format based on image quality, transparency requirements, compatibility, and file size.

12. Understanding WordPress Image Sizes

WordPress can automatically generate multiple image sizes when you upload an image.

Common image-size options include:

12.1 Thumbnail

Used for small previews and compact image displays.

Example:

150 × 150 pixels

12.2 Medium

Used for medium-sized content images.

Example:

300 × 300 pixels maximum

12.3 Large

Used for larger content areas.

Example:

1024 × 1024 pixels maximum

12.4 Full Size

Uses the original uploaded image dimensions.

Example:

1920 × 1080 pixels

Important: The dimensions above are common default examples, not fixed requirements. Actual sizes depend on Media Settings, theme support, plugins, and the uploaded image dimensions.

12.5 Why Does WordPress Generate Different Image Sizes?

Suppose you upload an image:

Original Image: 1920 × 1080

WordPress may generate additional versions:

Thumbnail: 150 × 150
Medium: 300 × 169
Large: 1024 × 576
Full: 1920 × 1080

The exact generated dimensions depend on the configured image sizes and cropping rules.

This allows your theme and WordPress to select an appropriate image size for different layouts.

13. How to Configure WordPress Media Settings

WordPress provides a Media Settings page to configure default image dimensions.

Open:

Dashboard → Settings → Media

You may find options such as:

13.1 Thumbnail Size

Configure:

  • Width

  • Height

  • Crop thumbnail to exact dimensions

Example:

Width: 150
Height: 150

If exact cropping is enabled, WordPress crops the image to the specified thumbnail dimensions.

13.2 Medium Size

Configure maximum width and height.

Example:

Max Width: 300
Max Height: 300

WordPress maintains the image proportions while fitting within the configured limits.

13.3 Large Size

Configure maximum width and height.

Example:

Max Width: 1024
Max Height: 1024

13.4 Organize Uploads into Month- and Year-Based Folders

This option controls how uploaded media files are organized.

When enabled, WordPress organizes uploads into folders based on year and month.

Example:

uploads/
    2026/
        11/
            image-1.jpg
            image-2.png

This is useful for managing media over time.

13.5 Save Changes

After reviewing your settings, click Save Changes.

Important: Changing Media Settings does not automatically regenerate every previously uploaded image in all sizes. Existing image thumbnails may require regeneration using an appropriate tool if you need the new dimensions applied to old media.

For most beginners, keeping the default Media Settings is a good starting point.

14. How to Optimize Images Before Uploading

Image optimization means reducing unnecessary file size while maintaining acceptable visual quality.

Large images can increase page weight and slow down website loading.

Follow these steps before uploading an image.

Step 1: Select the Correct Image

Choose an image that is relevant to the content.

Avoid using unnecessarily large images for small display areas.

Step 2: Rename the Image File

Use descriptive file names.

Bad example:

IMG_20261113_123456.jpg

Better example:

wordpress-media-library.jpg

Use meaningful words separated by hyphens.

Step 3: Resize the Image

If an image is much larger than the display area, resize it before uploading.

Example:

Original: 5000 × 3500
Optimized: 1600 × 1120

The correct dimensions depend on the theme layout and intended display size.

Step 4: Compress the Image

Use a suitable image-compression tool.

Examples include:

  • Squoosh

  • TinyPNG

  • Image editing software with export compression

Adjust the compression level while checking that the final image remains visually clear.

Step 5: Select an Appropriate Format

Choose JPEG, PNG, WebP, or AVIF according to the image and compatibility requirements.

Step 6: Add Alternative Text

Write a meaningful description of the image.

Example:

WordPress Media Library showing uploaded image files

Step 7: Upload the Optimized Image

Open:

Dashboard → Media → Add New Media File

Upload your optimized image.

15. How to Use Responsive Images in WordPress

Responsive images allow browsers to select suitable image resources based on the display size and other browser conditions.

WordPress supports responsive images through HTML attributes such as:

srcset
sizes

For example, WordPress may generate image markup that allows a browser to choose between smaller and larger versions of an image.

Conceptual example:

<img
    src="image-large.jpg"
    srcset="
        image-small.jpg 300w,
        image-medium.jpg 768w,
        image-large.jpg 1200w
    "
    sizes="(max-width: 768px) 100vw, 800px"
    alt="WordPress Media Library"
>

Here:

src: Provides the default image source.

srcset: Lists available image resources and their widths.

sizes: Describes the expected display width under different layout conditions.

The browser uses this information to select a suitable resource.

You do not normally need to write this markup manually when using standard WordPress image blocks because WordPress generates responsive image markup automatically in supported situations.

16. How to Insert an Image into a WordPress Post

Now let's use an uploaded image inside a blog post.

Step 1: Open:

Dashboard → Posts → Add New Post

Step 2: Enter a post title.

Example:

How to Use the WordPress Media Library

Step 3: Click the plus (+) button.

Step 4: Search for the Image block.

Step 5: Select Image.

Step 6: Choose one of the available options:

  • Upload

  • Media Library

  • Openverse, if available

Step 7: Select the required image.

Step 8: Add or review its alternative text.

Step 9: Configure the image block.

Depending on the editor and selected block, you may be able to configure:

  • Image alignment

  • Image size or resolution

  • Width

  • Height

  • Link settings

  • Caption

  • Additional styling

Step 10: Preview the post.

Step 11: Click Publish or Update.

Your image is now displayed inside the post.

17. How to Delete Unwanted Media Files

You can remove unnecessary files from the Media Library.

Follow these steps:

Step 1: Open:

Dashboard → Media → Library

Step 2: Find the image you want to delete.

Step 3: Open the image details.

Step 4: Select Delete permanently.

Step 5: Confirm the deletion if WordPress asks for confirmation.

Delete Multiple Media Files

You can also use Bulk Select in the Media Library.

  1. Open Media → Library.

  2. Click Bulk Select.

  3. Select the required files.

  4. Click Delete Permanently.

  5. Confirm the action.

Warning: Deleting a media file may break images or documents used in published posts, pages, templates, or other locations. Check where the file is used before deleting it.

18. Common Media Library Problems and Solutions

Problem 1: Image Upload Failed

Possible reasons:

  • File exceeds the upload limit.

  • Unsupported file type.

  • Server upload restrictions.

  • Insufficient server storage.

  • Temporary server or network issues.

Solution:

  • Check the file type.

  • Reduce image dimensions and file size.

  • Check the hosting upload limit.

  • Check server storage.

  • Review hosting or server error logs if the issue continues.

Problem 2: Image Is Too Large

Possible reason: The original image has unnecessarily high dimensions or file size.

Solution:

Resize and compress the image before uploading it.

Problem 3: Image Is Not Displaying

Possible reasons:

  • Incorrect image URL.

  • Missing file.

  • Cache issue.

  • Permission problem.

  • Incorrect website URL or HTTPS configuration.

Solution:

Check the image URL, file availability, browser console, and server configuration.

Problem 4: Image Looks Blurry

Possible reasons:

  • A small image is enlarged.

  • A low-resolution image is used.

  • Excessive compression.

  • An unsuitable image size was selected.

Solution:

Upload a sufficiently high-resolution image and select an appropriate image size.

Problem 5: WordPress Does Not Accept an Image Format

Possible reasons:

  • The format is not supported by the current WordPress installation.

  • The server does not support the required image-processing library.

  • Hosting security restrictions block the format.

Solution:

Use a supported format such as JPEG or PNG, or check WordPress and server support for the required modern image format.

Problem 6: Media Library Is Not Showing Updated Images

Possible reasons:

  • Browser cache.

  • CDN cache.

  • Image optimization plugin cache.

  • The wrong file was selected.

Solution:

Clear relevant caches and verify the file in Media → Library.

19. Best Practices for WordPress Image Management

  1. Use relevant images that support the page content.

  2. Rename image files before uploading.

  3. Resize images according to their intended display dimensions.

  4. Compress images without sacrificing necessary quality.

  5. Use appropriate image formats.

  6. Add meaningful alternative text to informative images.

  7. Use empty alternative text for purely decorative images where appropriate.

  8. Avoid unnecessary keyword stuffing in image descriptions.

  9. Use suitable image sizes in posts and pages.

  10. Avoid uploading the same image repeatedly.

  11. Remove unused media only after checking where it is used.

  12. Keep original high-quality files backed up when needed.

  13. Use responsive images for different display sizes.

  14. Check image loading on mobile and desktop devices.

  15. Use an optimization plugin only when its features are needed and compatible with your website.

20. Practical Assignment

Create an educational blog post and manage its images using the WordPress Media Library.

Task 1: Prepare Sample Images

Collect three images related to WordPress:

wordpress-dashboard.jpg
wordpress-media-library.jpg
wordpress-website-design.jpg

Task 2: Optimize the Images

For each image:

  • Rename the file.

  • Resize it appropriately.

  • Compress it.

  • Choose a suitable image format.

Task 3: Upload Images

Open Media → Add New Media File and upload all three images.

Task 4: Add Image Details

Configure the following:

Title: WordPress Dashboard

Alt Text:
WordPress administration dashboard

Caption:
Managing a WordPress website

Description:
A visual example of the WordPress administration interface.

Repeat the process for the other images with relevant descriptions.

Task 5: Review Media Library Views

Switch between Grid View and List View.

Task 6: Edit an Image

Select one image and practise:

  • Crop

  • Rotate

  • Scale

Task 7: Review Media Settings

Open:

Dashboard → Settings → Media

Understand the thumbnail, medium, and large image-size settings.

Task 8: Create a Blog Post

Create a post titled:

WordPress Media Library Tutorial

Task 9: Insert Images

Insert all three images into the post using Image blocks.

Task 10: Verify the Result

Preview the post on desktop and mobile.

Check that:

  • Images are visible.

  • Images have suitable dimensions.

  • Alternative text is meaningful.

  • Captions appear where required.

  • Images do not unnecessarily slow down the page.

Expected Result: You should be able to upload, edit, organize, and optimize images independently using the WordPress Media Library.

21. Frequently Asked Questions (FAQs)

Q1. What is the WordPress Media Library?

The Media Library is a built-in WordPress feature used to store and manage uploaded images, videos, documents, and other supported media files.

Q2. Where can I find the Media Library?

Open Dashboard → Media → Library.

Q3. How do I upload an image to WordPress?

Open Media → Add New Media File, select an image from your computer, and wait for the upload to finish.

Q4. Can I upload multiple images at once?

Yes. WordPress supports selecting and uploading multiple files through its media uploader.

Q5. Where are WordPress images stored?

WordPress normally stores uploaded media inside the wp-content/uploads/ directory.

Q6. What is Grid View?

Grid View displays uploaded media as thumbnail previews.

Q7. What is List View?

List View displays media items in rows with additional file information.

Q8. What is alternative text?

Alternative text describes the meaningful content or purpose of an image for screen-reader users and situations where the image cannot be displayed.

Q9. What is an image caption?

A caption is a short description that can appear below an image.

Q10. What is an image description?

An image description provides additional information about a media file.

Q11. What is the difference between image title and alt text?

The title identifies the media item, while alternative text describes the image's content or purpose.

Q12. Can I edit images directly in WordPress?

Yes. WordPress provides basic image-editing features such as crop, rotate, flip, and scale.

Q13. What is image cropping?

Cropping removes unwanted portions of an image.

Q14. What is image compression?

Image compression reduces file size while attempting to maintain acceptable visual quality.

Q15. Which image format is best for photographs?

JPEG and WebP are commonly suitable for photographs. The best choice depends on quality and compatibility requirements.

Q16. What is WebP?

WebP is a modern image format that provides efficient lossy and lossless compression.

Q17. What is AVIF?

AVIF is a modern image format that can provide efficient compression and high image quality.

Q18. What is a thumbnail image?

A thumbnail is a smaller image version commonly used for previews and compact displays.

Q19. What is the purpose of Media Settings?

Media Settings allows administrators to configure default image dimensions and upload organization preferences.

Q20. What is the uploads folder?

It is the directory where WordPress normally stores uploaded media files.

Q21. Can I use an image directly from the Media Library in a post?

Yes. Select the Image block and choose the required file from the Media Library.

Q22. What is responsive image support?

Responsive image support allows browsers to select suitable image resources for different display conditions.

Q23. What are srcset and sizes?

They are HTML image attributes used to provide browsers with information about available image resources and their expected display sizes.

Q24. Does WordPress automatically optimize every image completely?

WordPress generates different image sizes and supports responsive image markup, but you should still prepare and compress images appropriately.

Q25. Can I delete media files from WordPress?

Yes. Open Media → Library, select a file, and choose Delete permanently. First check whether the file is used elsewhere on the website.

22. Conclusion

The WordPress Media Library is an essential tool for managing website images and other media files.

In this tutorial, we learned how to upload images, use Grid View and List View, edit image details, add alternative text, crop and resize images, understand image formats, configure Media Settings, and optimize images for website performance.

We also learned about responsive images and how to insert optimized images into WordPress posts.

After completing the practical assignment, you should be able to manage website images more efficiently and maintain a better balance between image quality and website performance.

←
Post 11 of 40
→