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.
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
- Open Media → Add New and note the maximum upload size WordPress displays for your host; treat that as your byte ceiling.
- 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.
- 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.
- 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.
- 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
- WordPress Developer — big_image_size_threshold: https://developer.wordpress.org/reference/hooks/big_image_size_threshold/ — If the original image width or height is above the threshold it is scaled down, the threshold is used as max width and max height, the scaled copy becomes the largest available size, and returning false disables it. Default 2560. (checked 2026-11-20)
- WordPress core source — wp-admin/includes/image.php: https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/includes/image.php — The big-image branch that does the scaling, including the comment 'Append "-scaled" to the image file name. It will look like "my_image-scaled.jpg".' (checked 2026-11-20)
- Make WordPress Core — Introducing handling of big images in WordPress 5.3: https://make.wordpress.org/core/2019/10/09/introducing-handling-of-big-images-in-wordpress-5-3/ — The 2560 px default as introduced, the original kept under the original_image meta key, and wp_get_original_image_path() for reading it. (checked 2026-11-20)
- WordPress — Media Add New screen: https://wordpress.org/documentation/article/media-add-new-screen/ — '…a message displayed at the bottom of your view that indicates maximum upload size for files, as set by your hosting provider.' The page itself was last updated 2024-06-06. (checked 2026-11-20)
- WordPress Developer — wp_max_upload_size(): https://developer.wordpress.org/reference/functions/wp_max_upload_size/ — 'Determines the maximum upload size allowed in php.ini', read from ini_get('upload_max_filesize') and ini_get('post_max_size') with the smaller kept. There is no WordPress-published byte cap. (checked 2026-11-20)
- WordPress Developer — wp_get_image_encode_quality(): https://developer.wordpress.org/reference/functions/wp_get_image_encode_quality/ — 'Defaults to the per-format default (86 for WebP, 82 otherwise)', which is the quality of the sizes core generates after your upload. (checked 2026-11-20)
- WordPress Developer — wp_editor_set_quality: https://developer.wordpress.org/reference/hooks/wp_editor_set_quality/ — Filter that changes the editor quality for generated sizes, so a site can sit above or below those defaults. (checked 2026-11-20)
- PHP manual — core ini directives: https://www.php.net/manual/en/ini.core.php — upload_max_filesize default 2M and post_max_size default 8M, documented as the values used when php.ini is not loaded, with post_max_size required to be larger. (checked 2026-11-20)
- WordPress core source — wp-includes/script-loader.php: https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/script-loader.php — Uploader string 'The server cannot process the image… Uploading a smaller image may help. Suggested maximum size is 2560 pixels.' (checked 2026-11-20)
- WordPress core source — wp-admin/includes/file.php: https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/includes/file.php — Upload error template 'The uploaded file exceeds the %1$s directive in %2$s.', which renders as the upload_max_filesize / php.ini message. (checked 2026-11-20)
- web.dev — Compress images: https://web.dev/articles/compress-images — Experiment with various quality settings: there is no one universal compression setting. (checked 2026-11-20)
- Pillow — Image.save (JPEG quality, optimize): https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#jpeg — JPEG quality and optimize parameters used in the quality sweep behind Compress to KB. (checked 2026-11-20)
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
-
Compress image to KB
General hard byte-budget workflow for forms and marketplaces.
-
Compress images for email
Gmail and Outlook.com 25 MB attachment caps.
-
Compress images for WhatsApp
Meta Cloud API 5 MB JPEG/PNG image-message cap.
-
Compress images for GitHub
GitHub Docs 10 MB cap for images and GIFs on issues and pull requests.
-
Compress images for Discord
Discord Support 20 MB free per-file upload cap.
-
Compress images for Telegram bots
Telegram Bot API sendPhoto 10 MB cap for inline bot photos.
-
Compress images for LinkedIn posts
LinkedIn Help 5 MB cap for share-box photo uploads.
-
Compress images for Instagram
Instagram Graph API 8 MB JPEG cap for feed, Story, and Reels cover.
-
Compress images for Twitter / X
X API 5 MB still-image cap for Posts and DMs (animated GIF 15 MB).
-
Compress images for Notion
Notion Help 5 MB cap for inline PNG/JPG display (all plans).
-
Compress images for Wix
Wix Media Manager 50 MB images and 15 MB GIFs; Site Performance 25 MB upload note; SVG 250 KB; sRGB.
-
Compress images for Webflow
Webflow Help 4 MB Assets panel and CMS image fields; built-in Compress OG caveat; background images without responsive variants.
-
Compress images for Squarespace
Squarespace Help 20 MB upload cap, 500 KB performance recommendation, 120 MP and 2500 px width guidance; auto WebP display on site.
-
Compress images for Ghost
Ghost Help Ghost(Pro) per-file upload limits by plan (5 MB–1 GB); default self-hosted nginx 50 MB cap.
-
Compress images for beehiiv
beehiiv Help 5 MB post/media-library uploads, 1200×630 thumbnails; community posts up to 10 MB.
-
Compress images for Facebook
Meta Help Center 15 MB photo uploads; keep PNG under 1 MB to avoid pixelation.
-
Compress images for Pinterest
Pinterest Help 20 MB web Image Pin max; BMP, JPEG, PNG, TIFF, WEBP.
-
Compress images for YouTube
YouTube Help custom thumbnails: 50 MB on desktop; 50 MB mobile video, 10 MB mobile podcasts; JPG or PNG.
-
Compress images for Threads
Threads API image posts: 8 MB max JPEG or PNG; width 320–1440 px, aspect ratio up to 10:1.
-
Compress images for Bluesky
Bluesky post embeds: 2 MB max per image blob (image/*); up to 4 images; alt text required.
-
Optimize images for web
General web performance and format choices beyond WordPress uploads.
-
Responsive images
srcset and sizing concepts separate from Media Library byte limits.
-
Why is my image still large?
Diagnosis after compress when bytes barely moved.
-
File size vs dimensions
Why pixel count and byte count are different levers.
-
Compress to KB tool
Set a KB target and download a file under budget.
All compress to kb guides
- Compress image to KB: hit a hard file-size limit
- Compress images for email: hit Gmail and Outlook attachment caps
- Compress images for WhatsApp: hit the 5 MB image message cap
- Compress images for GitHub: hit the 10 MB image and GIF cap
- Compress images for Discord: hit the 20 MB free upload cap
- Compress images for Telegram bots: hit the sendPhoto 10 MB cap
- Compress images for LinkedIn posts: hit the 5 MB photo share limit
- Compress images for Instagram: hit the 8 MB JPEG upload limit
- Compress images for Twitter / X: hit the 5 MB image upload limit
- Compress images for Notion: stay under the 5 MB inline limit
- Compress images for Facebook: file size and format before upload
- Compress images for Pinterest: hit the 20 MB web Image Pin cap
- Compress images for YouTube: custom thumbnail file-size limits
- Compress images for Threads: hit the 8 MB image post limit
- Compress images for Bluesky: hit the 2 MB post embed limit
- Compress images for TikTok: hit the 20 MB photo upload limit
- Compress images for Shopify: hit the 20 MB and megapixel upload limits
- Compress images for Mastodon: hit the 16 MB post attachment limit
- Compress images for Slack: byte size and inline preview limits
- Compress images for eBay: hit the 12 MB listing photo limit
- Compress images for Etsy: stay under the 1 MB upload reliability tip
- Compress images for Medium: hit the 25 MB story-editor limit
- Compress images for Google Business Profile: fit 10 KB–5 MB photo rules
- Compress images for Wix: Media Manager limits and practical upload ceilings
- Compress images for Webflow: 4 MB Assets limits and upload prep
- Compress images for Squarespace: 20 MB cap and 500 KB performance recommendation
- Compress images for Ghost: Ghost(Pro) plan caps (5 MB–1 GB) and self-hosted 50 MB nginx default
- Compress images for Gumroad: 50 MB cover limit and thumbnail prep
- Compress images for beehiiv: 5 MB newsletter uploads, 1200×630 thumbnails, and 10 MB community posts
- Compress images for Mailchimp: 1 MB Content Studio uploads, 1024 KB targets, and legacy vs new builder widths
- Compress images for Kit: smaller-than-25 MB gallery, form/LP sizes, and email look-best width
- Compress images for Klaviyo: 10 MB email ceiling, 1024 KB load targets, form 5120 KB, and full-width dimensions
- Compress images for MailerLite: 10 MB File manager, 1024 KB campaign prep, GIF 4 MB, and width rules
- Compress images for Brevo: 5 MB Content library, layout widths, and HTML/attachment contrast
- Compress images for Substack: official sizes, PNG email banners, and dimension-first prep
- Compress images for Google Ads: 5120 KB JPG/PNG assets, aspect ratios, and surface-specific rows