Home β†’ WordPress

Pre-Size Images Before WordPress
Makes Six Copies of Them

Almost every WordPress image article starts with a plugin. This one starts a step earlier, at the file still sitting in your downloads folder, because everything WordPress does after upload is multiplication β€” extra sizes, extra encodes, extra bytes β€” not reduction.

What follows is the behaviour WordPress documents, the ceiling it explicitly does not set, and a browser-only way to arrive with a file that is already the right weight. Nothing here uploads anything: encoding happens on your machine, with no account and no queue.

What happens the moment you upload

The developer reference for add_image_size() lists the size names WordPress reserves β€” thumb, thumbnail, medium, medium_large, large, post-thumbnail β€” and the defaults registered out of the box: thumbnail at 150Γ—150 (square-cropped if that option is ticked), medium at 300Γ—300, large at 1024Γ—1024, and 1536Γ—1536 and 2048Γ—2048 added in WordPress 5.3. Sizes above the first one are scaled proportionally unless a hard crop is registered.

  • Read the consequences, not just the numbers: upload one 5000Γ—3333 photo and you have paid for a full-size original plus every registered sub-size.
  • Those copies are re-encoded by your server, at the quality your PHP image library chooses β€” not by you.
  • The responsive srcset only picks from sizes that exist, so a theme that never uses 2048 px still got one generated.

The 2560 px rule people forget

Core’s 5.3 development note introduced handling for big images: the default threshold is 2560 px, filterable through big_image_size_threshold. An upload wider or taller than that is scaled down, and the scaled copy is what the sub-sizes are built from β€” while the original file stays on disk.

Source: make.wordpress.org core dev note and the hook reference, checked October 2026.

Where your upload ceiling really comes from

WordPress core publishes no kilobyte limit for an image upload, and there is no setting in the dashboard that pretends otherwise. The reference for wp_max_upload_size() states plainly that it β€œDetermines the maximum upload size allowed in php.ini”, reading upload_max_filesize and post_max_size and returning the smaller of the two.

The Settings β†’ Media screen, meanwhile, only lets you enter maximum dimensions in pixels for the sizes it generates, plus the upload-organising checkbox β€” there is no file-size field on it at all. Multisite adds a per-site network setting, and most managed hosts expose their own cap.

Sources: wp_max_upload_size() reference and the Media settings documentation, checked October 2026. Take your real number from the footer of your own Add New Media screen.

Formats the library will actually accept

WebP
Uploadable since WordPress 5.8, provided the server's image library β€” Imagick or LibGD β€” supports it. Core does not convert your JPEGs into WebP for you; that is still plugin territory.
AVIF
Accepted since WordPress 6.5, with a documented default quality of 82 and lossless at 100. Editing support depends on the library version, so verify in Site Health before you commit a workflow to it.
JPEG / PNG
The two formats no host or theme argues about. Use PNG for screenshots and line art where crisp edges matter, JPEG for photographs.

Sources: WordPress 5.8 adds WebP support and WordPress 6.5 adds AVIF support, checked October 2026.

Width versus column width β€” the only resize that matters

Find the width your theme actually paints content at (the editor’s content column is a good proxy, and many themes document their featured-image dimensions), then upload at that width or a little above. A 4000 px upload served inside a 740 px column is not a sharper page; it is the same picture with more bytes on it.

The usual counter-argument is retina duplication: doubling the file to look crisp on a 2Γ— screen. That trade only pays when the browser can choose β€” a registered sub-size at 2Γ— the column width is worth having; a full-resolution master in the post is not.

And the cheapest WordPress win is not compression at all: fill the alt text field, write a caption a screen reader will understand, and give the file a name that describes the picture. No compressor can retro-fit those, and they are what makes an image findable and accessible rather than merely light.

Our working numbers (ours, not WordPress’s)

Since WordPress sets no byte budget, these are the targets we would use with this tool on a normal content site:

In-content image
column width, ≤ 200 KB
Featured / hero
up to 1600 px wide, 250–400 KB
Card thumbnail
≤ 60 KB
Screenshot / line art
PNG, 150–250 KB
Photo gallery set
1200 px wide, 150 KB each
Logo with transparency
PNG, ≤ 50 KB

Prepare the upload here

Target KB Mode is on and set to 150 KB below β€” a sensible starting point for body content. Re-encoding is lossy, so treat the output as the highest quality that fits under your number, not a promise that nothing was discarded.

βš™οΈ
How compression works β€” zero upload
All processing runs directly in your browser via its own image decoding and encoding APIs. No pixels are ever sent to any server, so the tool works for passport photos, visa documents and other sensitive images.
πŸ“¦ ZIP
⚑ Quick Presets
Quality80%
Smaller fileBetter quality
πŸ“
Drop images here or click to upload
JPG Β· PNG Β· WebP Β· AVIF Β· HEIC Β· Up to 50 files Β· Free
or press Ctrl+V / ⌘V to paste an image from the clipboard
πŸ“
STEP 1
Drop your image
JPG, PNG, WebP, HEIC β€” up to 50 files
🎯
STEP 2
Choose mode
Quality slider or target KB size
⬇️
STEP 3
Download free
Instant β€” no upload, no account

The prep order that saves the most bytes

01
Crop and straighten somewhere else
This tool cannot crop to a ratio, resize to a dimension you name or remove a background. Do composition in an editor, size reduction here.
02
Add the whole set at once
Up to 50 files per batch, JPG, PNG, WebP, AVIF or HEIC input, so a week of posts is one sitting.
03
Pick the format before the number
WebP or AVIF for images you serve yourself; JPEG when the same file also goes to another platform.
04
Type the target, then check the compare view
The before/after slider is how you confirm small text and edges survived the budget you chose.
05
ZIP, then upload once
Download the batch as a ZIP and drop finished files into the Media Library β€” they arrive under budget, so no server-side rescue plugin is needed.

Boundaries worth knowing before you rely on this

  • Longest side is capped at 4096 px during processing, so a huge master is downscaled as well as re-encoded.
  • Output options are WebP, AVIF, JPEG and PNG β€” WordPress will not have AVIF support on older or oddly configured hosts, so check Site Health first.
  • Files already smaller than your target return unchanged, which means a batch of mixed sizes is safe to run in one pass.
  • Target KB Mode searches encoding quality and stops when the interval narrows, so output is at or under the number β€” not exactly it, and not to the byte.

WordPress-specific questions

Does WordPress make the resized copies, or should I?

WordPress does. On upload it registers a set of sub-sizes β€” thumbnail, medium, medium_large, large and the two extras added in 5.3 β€” and generates them from whatever file you hand it. That is why the useful work happens before the upload: a 4000 px camera JPEG does not get sharper, it gets multiplied, and each of those copies is encoded by your server at WordPress's own quality settings rather than by you.

Why does my upload fail at a few megabytes when WordPress sets no limit?

Because the ceiling is not WordPress's. The core function that computes it, wp_max_upload_size(), is documented as determining "the maximum upload size allowed in php.ini", taking the smaller of upload_max_filesize and post_max_size. Your host sets those. multisite installations add their own per-site setting on top, so check the wording under your own Add New Media screen.

Is AVIF safe to add to the WordPress Media Library?

On WordPress 6.5 or newer, yes β€” AVIF upload support landed in that release, with a default quality of 82, and WebP has been accepted since 5.8. Both depend on the server's image library supporting the format, which Site Health will tell you. Also note the asymmetry: this browser tool falls back to WebP when a browser cannot encode AVIF, and WordPress will not convert your existing JPEGs into modern formats by itself.

Can this tool rewrite the images already inside my Media Library?

No. It has no server-side access, no plugin and no credentials β€” it works on files you select from your own disk, up to 50 at a time. Anything already published stays where it is; the workflow here is to prepare the next upload so it arrives small enough not to need rescuing.

Next reads

Compress for WooCommerceCompress for SquarespacePNG to JPGJPG to PNGCompress to 200 KBImage size checker

Independent page by CompressTo20KB. WordPress is a trademark of its own owners; we are not affiliated with or endorsed by them, and this tool has no connection to your site β€” it prepares files on your device before you upload them yourself.