Compress to KB topic guide

Compress images for WordPress: Media Library size and big-image rules

Direct answer

Before you upload to the WordPress Media Library, resize photos so the long edge is 2560 pixels or less and keep the file under the maximum upload size WordPress shows on Media → Add New. JPEG or WebP is the usual choice for photographs. That matches WordPress core’s big-image handling and avoids the upload errors and “-scaled” filenames users see when a phone photo is far larger than the server expects.

Try the Compress to KB

What this workflow handles

Three different numbers govern a WordPress upload, and only one of them belongs to WordPress. The byte ceiling is not published by WordPress at all: wp_max_upload_size() reads upload_max_filesize and post_max_size from php.ini and keeps the smaller, so the number that applies to you is whatever your host configured, and Media → Add New displays it. The 2560 px figure is behaviour rather than a limit. Since 5.3 the big_image_size_threshold uses 2560 as the maximum width and maximum height: an upload wider or taller than that is scaled down, the scaled copy becomes the largest available size, and the original bytes stay on disk. The third number is your theme's, because registered image sizes decide what is generated and shown, which is why a 4000 px master costs disk and encode time without ever displaying at 4000 px. Core also re-encodes on its own pass at default quality 82 for JPEG and 86 for WebP, so crushing quality before upload stacks a second lossy pass on top of it; correct dimensions and sensible quality beat a tiny file that gets rebuilt anyway. Two practical consequences: set your target under the number on your own Add New screen rather than a figure copied from a support forum, and remember that a host raising the ceiling does not move the 2560 px behaviour. The error text is worth recognising before you need it: 'The server cannot process the image… Suggested maximum size is 2560 pixels.' is core's own string when image post-processing fails, and 'The uploaded file exceeds the upload_max_filesize directive in php.ini.' means the byte ceiling was hit, not the pixel one. Beita outputs PNG, JPEG or WebP only. Whether your install accepts another container depends on its PHP image library and version, and format support has moved across releases, so check Tools → Site Health → Info → Media Handling on your own site instead of trusting a version number quoted on the internet, including this page.

Use Compress to KB with a target safely under the maximum upload size shown on Media → Add New. Resize the long edge to ≤2560 px before upload when possible. For balanced re-encode without a KB target, open Image Compressor; for WebP or HEIC from your phone, see WebP Converter and HEIC→JPG. For Notion’s 5 MB inline cap, see Compress image for Notion.

How to use it

  1. Open Media → Add New and note the maximum upload size WordPress displays for your host; treat that as your byte ceiling.
  2. Check pixel dimensions: if the long edge is above 2560 px, resize width or height first (Image Compressor downscale or export from your editor) so WordPress does not need to create a -scaled master.
  3. Convert phone HEIC to JPEG with HEIC→JPG if your workflow needs a classic JPEG in the library; try WebP Converter when you want WebP and your WordPress version and server libraries support it.
  4. Enter a Compress to KB target safely under your shown upload maximum (leave headroom below upload_max_filesize), quality-sweep at the current dimensions first, and downscale only if the quality floor still exceeds the budget.
  5. Upload the prepared file to the Media Library, confirm it appears without upload_max_filesize or server cannot process errors, and re-check Site Health → Media Handling if you use AVIF.

Frequently asked questions

Why does my uploaded image filename end with “-scaled”?

Since WordPress 5.3, when an uploaded image is wider or taller than the big_image_size_threshold (default 2560 px), WordPress creates a scaled-down copy with a -scaled suffix and uses that as the largest available size while still storing the original in uploads. Resizing to ≤2560 px on the long edge before upload often avoids the -scaled rename when you do not need the oversized original on the server.

How do I find my WordPress upload size limit?

Open Media → Add New in wp-admin. WordPress documentation states this screen shows the maximum upload size for files as set by your hosting provider. That cap comes from PHP settings such as upload_max_filesize (and related limits your host configures), not from a single universal WordPress number. If you hit “The uploaded file exceeds the upload_max_filesize directive in php.ini,” compress or resize until the file is under the shown maximum.

Which image format should I upload to WordPress?

JPEG for photographs, and WebP where your site already serves it, are the two common choices; Beita outputs PNG, JPEG or WebP. What your own install accepts and regenerates depends on its PHP image library and version, and container support has moved across releases, so confirm under Tools → Site Health → Info → Media Handling before planning around a newer format. Remember that core re-encodes generated sizes at quality 82 for JPEG and 86 for WebP unless a filter changes it, so a pre-crushed upload arrives doubly compressed.

Will WordPress compress my image again after upload?

Yes. WordPress generates multiple registered sizes and re-encodes them using WP_Image_Editor, with default quality 82 for JPEG and 86 for WebP unless your site changes wp_editor_set_quality or jpeg_quality. Pre-upload crushing can stack on top of that second pass — prefer reasonable quality plus correct dimensions (≤2560 px long edge when possible) rather than an ultra-low quality export.

Can I fix upload_max_filesize by editing php.ini myself?

On many hosts you cannot edit php.ini directly; use your host’s control panel or ask support to raise upload_max_filesize and ensure post_max_size stays larger. Site owners can also adjust big-image behavior with the big_image_size_threshold filter documented in WordPress 5.3 big-image handling — that changes scaling, not PHP byte caps.

How is WordPress Media Library prep different from Webflow or Wix site-builder uploads?

Different products and published numbers. WordPress shows a host-specific upload maximum on Media → Add New and applies the 2560 px big-image threshold on upload — this page. Webflow Help documents a 4 MB maximum for images in the Assets panel and CMS image fields, with inline responsive variants but not for background images — see compress-image-for-webflow. Wix Help documents Media Manager images up to 50 MB with a separate Site Performance note against uploads over 25 MB — see compress-image-for-wix. Same Compress to KB tool; match the destination you upload through.

Sources

Explore the compress to kb topic cluster

This guide covers WordPress Media Library upload bytes and the 2560 px big-image threshold. Related guides cover general KB budgets, email, WhatsApp, LinkedIn share photos, Instagram Graph JPEG caps, Twitter / X still-image caps, Notion inline image caps, Facebook Help photo upload caps, Pinterest web Image Pin caps, GitHub, Discord, Telegram caps, web optimization theory, and the Compress to KB tool.

Related guides

All compress to kb guides