Sample Image Files

Download a PNG, JPG or WebP image with an exact file size, from 1 to 100 MB. Useful for testing the upload limit of forms, CMSs, APIs and proxies.

Format
Image dimensions

Ready-made file sizes

One click generates the image and starts the download.

1 MB PNG

1,048,576 bytes

2 MB PNG

2,097,152 bytes

5 MB PNG

5,242,880 bytes

10 MB PNG

10,485,760 bytes

15 MB PNG

15,728,640 bytes

20 MB PNG

20,971,520 bytes

25 MB PNG

26,214,400 bytes

30 MB PNG

31,457,280 bytes

50 MB PNG

52,428,800 bytes

75 MB PNG

78,643,200 bytes

100 MB PNG

104,857,600 bytes

Custom file size

Enter the file size in MB, from 0.01 to 100. The buttons generate 1 byte less, the exact value and 1 byte more, to test the edge of a limit.

10,485,760 bytes

Only need an image with the right width and height?

Generate a placeholder image

How the file reaches the exact file size

The browser draws the image and encodes it in the chosen format. Then the tool pads the file with extra blocks that programs skip, until it reaches the requested number of bytes. That's why the image still opens normally in any viewer.

PNG

Gets blocks of a private type before the final block. Anything that doesn't know the type ignores it.

JPG

Gets comment segments right at the start of the file. The format has a field for this, and decoders ignore it.

WebP

Gets a block of an unknown type at the end of the file, and the header is updated for the new file size.

A file can't be smaller than the base image. If you ask for less, the tool shows the base image's file size and suggests smaller dimensions.

How much is 1 MB here

Here, 1 MB is 1,048,576 bytes (1024 × 1024). That's how Windows counts, and how backends count when they write the limit as 10 * 1024 * 1024. The Mac Finder counts differently: 1 MB is 1,000,000 bytes. So the same file shows different file sizes depending on the system.

Bytes for each file size, under both counts
File sizeHere (1 MB = 1,048,576 bytes)Mac Finder (1 MB = 1,000,000 bytes)
5 MB 5,242,8805,000,000
10 MB 10,485,76010,000,000
20 MB 20,971,52020,000,000
50 MB 52,428,80050,000,000
100 MB 104,857,600100,000,000

If your system's limit uses 1,000,000 bytes per MB, use the custom field: 10 MB in Finder is 9.54 MB here.

How to test an upload limit

Generate three files around the limit and see what the system does with each one. Enter the limit in the custom file size field, for example 10 MB, and use the three buttons.

1 byte below

Should be accepted. If it's rejected, the real limit is lower than the documented one.

Exact file size

Should be accepted when the limit is "at most". If it's rejected, the system uses "less than".

1 byte above

Should be rejected, with a clear error message. If it goes through, the limit isn't being enforced.

If the exact file is rejected, check whether a proxy or CDN counts the whole request body: multipart/form-data adds a few bytes to the file.