Back to blog
6 min read Export Guides

Export the Media Library with File Sizes to Find Large Images

Large images slow pages down and fill the hosting plan, but the WordPress Media Library doesn’t let you sort files by size. Exporting the library to a spreadsheet does: one row per file, with its size in bytes, dimensions and the post it belongs to. Import Export by RockStarLab does that, and the result shows why the file size WordPress reports can be much smaller than the space an image really takes. In our test library of 111 images (69 MB in total), two uploads took 47 MB.

Free: Media Library export with file size, original size, size on disk, dimensions, alt text and the attached post, to CSV, XLSX, ODS, JSON or XML. PRO: transformations of values during export.

Short Answer

  1. Go to Import Export → Export and choose Media.
  2. Add the filter MIME Type contains image, and if you like File Size (bytes) greater than 300000 (about 300 KB).
  3. Add the columns File Name, File Size, Original File Size, Size on Disk, All Sizes, Width, Height, Attached Post Title and File URL.
  4. Export to CSV or XLSX and sort by Size on Disk.

Exports only read your content, so you don’t need a backup for them.

Why one image is several files

When you upload a photo wider or taller than 2,560 pixels, WordPress keeps your upload as the original, saves a smaller copy with -scaled in its name and uses that copy on the site. It then creates more sizes for thumbnails and responsive images, and themes and WooCommerce add their own. One upload of 14 MB in our test turned into twelve files with 17 MB together.

That’s why the export has three size columns:

Column What it measures
File Size (bytes) The main file WordPress uses, which is the -scaled copy for large uploads
Original File Size (bytes) Your upload as it was, before scaling; the same as File Size when nothing was scaled
Size on Disk, All Sizes (bytes) All files of the image together: original, scaled copy and every generated size

Step 1: Filter the images

Open Import Export → Export, choose Media and click Next Step. Add the filter MIME Type Contains image to leave out PDFs, videos and audio. To list only bigger files, add File Size (bytes) Greater Than and a number of bytes: 300000 is about 300 KB, 1000000 about 1 MB. In our library, 10 images were larger than 300 KB.

Media export step 2 with filters MIME Type contains image and File Size (bytes) greater than 300000, Total Items Available 10
Images larger than about 300 KB: 10 files.

The File Size filter looks at the main file. A 14 MB upload that WordPress scaled to 1.8 MB passes a 1 MB filter but not a 2 MB one, so for a complete picture, export all images and sort by Size on Disk instead.

Step 2: Choose the columns

Media export columns ID, File Name, MIME Type, File Size, Original File Size, Size on Disk All Sizes, Width, Height, Attached Post Title and File URL
Three size columns: main file, original upload and all sizes together.

Attached Post Title shows the post or page the image was uploaded to, which tells you where to replace it. Width and Height show images that are far larger than your theme ever displays them. In step 4, choose CSV or XLSX and click Start Export.

Step 3: Read the file

The three biggest images of our export, sorted by Size on Disk:

File Name File Size Original Size on Disk Width × Height Attached To
summer-banner-scaled.png 8,760,927 12,184,712 31,222,610 2560 × 1365 Contact Us
bakery-front-original-scaled.jpg 1,852,507 14,301,888 18,203,713 2560 × 1707 About Us
dsc09114-2.jpg 340,002 340,002 1,029,578 1600 × 1200 Post Format: Gallery

To see megabytes, add a column with =ROUND(F2/1048576, 1), where F is the Size on Disk column. Patterns to look for:

  • PNG photos. The summer banner is a photo saved as PNG: 8.7 MB for the scaled copy alone and 30 MB on disk. The same picture as JPEG or WebP is a fraction of that.
  • Huge originals. A 4800-pixel camera photo is stored at full size even though the site shows the 2560-pixel copy. Resize photos before uploading.
  • Images without an attached post may be unused, but check first: an image can be used in content, a widget or the theme without being attached.

Step 4: Replace the large images

Compress or resize the image, upload the new version and change it in the post you found in Attached Post Title. Deleting the old file removes the original, the scaled copy and all sizes. Before you delete files from the Media Library, create a backup: a deleted image disappears from every post that uses it.

If you only need a list of files to check or move, see exporting the Media Library to CSV or Excel; to find images without alt text in the same export, see finding images without alt text.

With an AI agent

An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can do the export and the sorting:

Export all images in the Media Library with file size, original size, size on
disk, dimensions and the attached post. Tell me how much space images take in
total and which five take the most.

In our run, the agent called rsl-ie/export-start with export_type: media, the filter post_mime_type contains image and the fields file_size, original_file_size, disk_usage, width, height and attached_post_title. It reported 111 images with 69.1 MB on disk, and named the summer banner (29.8 MB, attached to Contact Us) and the bakery front photo (17.4 MB, About Us) as two thirds of the total.

FAQ

How do I find the largest images in WordPress?

Export the Media Library with the size columns and sort by Size on Disk. WordPress’s own Media Library can’t sort by file size.

Why is the file size smaller than the image I uploaded?

WordPress scaled it. Uploads wider or taller than 2,560 pixels are stored as an original plus a smaller “-scaled” copy; File Size shows the copy, Original File Size the upload.

What does Size on Disk include?

All files of the image: the original, the scaled copy and every thumbnail and responsive size created by WordPress, the theme and plugins.

Can I filter by size in megabytes?

The filter uses bytes: 1 MB is 1048576 bytes. Type 1000000 for roughly 1 MB.

Is an image without an attached post unused?

Not necessarily. Images can be used in content, widgets, menus or the theme without being attached to a post. Check before deleting.

Get the free plugin on WordPress.org.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

Your email address will not be published. Required fields are marked *

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE