WordPress – Find Images by File Size in Media Library

Sometimes we want to compress our images so that they don’t take up too much space in our server. However, it can be really difficult because we don’t have that option in WordPress. Fortunately, we want to show you a good way to order your files by size in order to compress them and change them.

You’ll export all your files to a CSV file and then order them by size in Excel or Google Sheets, and it’s going to take you just a few minutes. Just follow these simple steps.

1- Install the Media Library Spreadsheet plugin

This plugin helps you apply changes to hundreds of files at once. You’ll not have to spend too much time to edit thousands of products. This plugin simplifies your life completely.

You can download the plugin here:

Download Media Library Spreadsheet Plugin - or - Check the features

2- Open the Media Library Spreadsheet plugin

Once you install and activate the plugin, go to Sheet Editor > Edit Media to open the spreadsheet. You’ll see it with all your files and their complete information.


3- Filter all your images

The Media Library Spreadsheet displays all types of media. Therefore, you need to filter the images only. But it’s really simple. Just open the Search tool, located on the toolbar.

Once there, just tick the Enable advanced filters checkbox and select these values.


  • Field key: Format
  • Operator: CONTAINS
  • Value: image

Now just click on Run search to filter the images.

4- Open the plugin’s “Export” tool

Now you need to export your files with their complete information to a CSV file. For that, just click on Export on the plugin’s top toolbar.


5- Select the columns you’ll export

Now you need to select the columns you’ll edit. For example, you could export all columns or just export specific columns such as the ID, Title and Size columns. We’ll export them all.

Tick the I understand it will export the posts from my current search.


You have the I will edit this file with Microsoft Excel option. Sometimes Excel shows all the values in a single cell and does not recognize the comma as separator. This checkbox fixes that problem, so you should tick it.

Once you’re ready to export, just click on Start new export.

6- Order your images by size in Excel or Google Sheets

Once you have the file exported, just open it with Excel or Google Sheets. Once there, just go to the File Size (kb) column, and you can order them by size from bigger to smaller size.



Now that you have ordered your files by size, you decide if you want to compress them and then upload them to WordPress again.

You can download the plugin here:

Download Media Library Spreadsheet Plugin - or - Check the features

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.