Download 4 MB JPG image for testing

Preview the image and test your image-upload limit. The preset is 4 MiB (4,194,304 bytes); choose MB for decimal megabytes.

4,194,304 bytes · built in your browser, nothing uploaded
4,194,304 bytes
4 MiB · JPG · 1,927 B
Exact size

1 MB = 1,000,000 B · 1 MiB = 1,048,576 B

WidthHeight
Advanced: test an upload limit

Enter the byte limit above, then choose one byte below, the exact limit or one byte above. Each choice uses the same base: 4,194,304 B. Generate and download each file to test your endpoint.

Where a 4 MB JPG comes up

  • Finding the largest photo your serverless upload route can take before you move uploads to presigned URLs.
  • Testing client-side resizing that should only start above 4 MB.
  • Checking mobile upload progress bars with a file that takes a few seconds on 3G-like speeds.

Limits it lands on

  • As base64 it becomes about 5.59 million bytes, which still fits AWS Lambda's 6 MB synchronous payload; the 5 MB JPG does not.
  • Vercel Functions accept request bodies up to 4.5 MB, so this image, including the multipart overhead, still fits.
  • Over PHP's default 2M upload_max_filesize and Django's 2.5 MB in-memory threshold.

What is inside the file

About 64 comment segments of up to 65,533 bytes each fill the space between the start-of-image marker and the encoded 800 × 600 picture.

The exact byte count is 4 × 1,048,576 = 4,194,304, which is identical on every download.

Questions

Why does 4 MB work on Lambda while 5 MB fails?

Binary uploads pass through API Gateway as base64, adding about one third: 4 MiB becomes about 5.6 million bytes and 5 MiB about 7 million, over the 6 MB limit.

Is 4 MB a realistic phone photo size?

Yes; many compressed smartphone photos are a few megabytes, which makes this a sensible test case for an upload route.

Reference and checks

Format reference: ITU-T T.81 (JPEG).

Preset target: 4 MiB (4,194,304 bytes). Verify the downloaded file's byte count.

Generate another size in this format · Technical notes for every format · Guide to testing file upload limits · Data processing and privacy

Related tools: Image Convert · Resize Image · Compress Image.

Noticed an issue with this test file? Report an issue →