Skip to content
Mb2KbSizer

Guides

Image Dimensions vs File Size: Meet Both Upload Requirements

Pixels and kB measure different things. Learn how to meet a form's width, height and file-size limits without stretching a photo or cropping key details.

By Naveed Published 5 min read

An upload form asks for a photo under 100 kB and exactly 400 by 500 pixels. You compress a phone picture to 98 kB, upload it and still get an error. The file passed the byte limit, but it did not necessarily pass the width and height requirement.

Pixels describe the grid that makes up the image. Bytes describe how much storage its encoded file uses. These measurements influence each other, but neither replaces the other. A reliable upload workflow handles the required shape first, then checks the actual dimensions, format and file size together.

Read the requirement as separate checks

Before editing, write down the requirements beside the upload field. Do not copy dimensions from an unrelated application or assume every photo field follows the same rule. An avatar, signature and full-page document may all use different constraints on the same website.

Requirement Example only What it controls
File format JPG The encoded file type
Maximum file size 100 kB The allowed number of bytes
Pixel dimensions 400 × 500 px Width and height of the image grid
Aspect ratio 4:5 The relationship between width and height
Content rules Face centered, all edges visible What the image must show

These example values are not the requirements of any particular portal. Follow the current instructions of the service receiving your file. Some services specify a range of dimensions rather than one exact pair, and some impose a minimum file size as well as a maximum.

Why two equal-size pictures use different bytes

Imagine two images that are both 1000 by 1000 pixels. One is a plain white background with a small logo. The other is a detailed photograph of leaves and hair. Their pixel counts match, but the encoded files may differ considerably because the patterns are different.

The output format matters too. A PNG and a JPEG of the same photograph can have different file sizes and different visual properties. The format guide explains the general choices; for a submission, the accepted format listed by the portal takes priority.

This is why there is no universal conversion from 100 kB to a particular width and height. A chart claiming that every 50 kB image must be a specific number of pixels leaves out the content and encoding decisions. Measure the actual result instead of relying on that shortcut.

Choose fit or exact dimensions deliberately

Mb2KbSizer provides dimension controls inside its format and dimensions section. A fit operation keeps the complete picture inside a requested bounding box while preserving its proportions. That is useful when the destination gives maximum dimensions but does not demand a precise shape.

Exact width and height work differently. When both are supplied, the tool uses a centered crop to fill the requested rectangle without stretching the image. This produces the requested shape, but portions of the original may lie outside the crop.

For example, a 1200 by 800 landscape image has a 3:2 ratio. A 400 by 500 target has a 4:5 ratio. The shapes are not equivalent. Keeping the full landscape picture would leave empty space in the portrait rectangle; filling the portrait rectangle requires cropping some width. There is no compression setting that resolves that geometric mismatch by itself.

Prepare the crop before trying a strict byte target

Look at the important content before setting exact dimensions. A centered crop works only if the required content is inside that center region. It may cut off a signature placed near the edge, the top of a head, or part of a document’s border.

If the crop is wrong, prepare the composition in an editor and use the corrected original as your input. This compressor does not currently offer an interactive crop-position editor. Avoid trying to compensate with a different file-size target; bytes do not control which part of the picture is centered.

For a document upload, follow any requirement to show the complete page. For a portrait, follow the receiving service’s framing instructions. Do not assume the crop that looks nicest is the crop the application requires.

A worked workflow for a hypothetical form

Suppose your form explicitly accepts JPG, requires 400 by 500 pixels and sets a maximum of 100 kB. Use the following sequence:

  1. Start with a clear original whose content can fit the required portrait shape.
  2. Open the image compressor and add that original.
  3. Select JPG rather than relying on a filename extension.
  4. Enter 400 for width and 500 for height in exact mode.
  5. Set the target to 100 kB and compress.
  6. Check the reported output dimensions and whether the target was reached.
  7. Open the downloaded image and inspect the framing before uploading.

These steps are an example of satisfying independent constraints, not a recommended size for every form. If your actual form gives a minimum byte limit as well, check that the result is not below it. Mb2KbSizer aims for an upper bound; it does not add artificial padding to meet a minimum.

What if exact dimensions prevent enough compression?

When exact width and height are locked, the tool cannot keep reducing the pixel count to satisfy an increasingly small budget. It can search compression settings for supported formats, but it may still be unable to reach the limit cleanly.

Do not submit a larger result merely because you entered the requested target. Read the outcome and check the downloaded bytes. If the file is too large, confirm that you selected the right accepted format. A photograph saved as PNG may need a different approach from the same photograph saved as an allowed JPEG.

If the file meets the limit but important details become unreadable, go back to the source. A sharper, better-framed photograph can be more useful than an oversized blurry one. Keep in mind that expanding a tiny source to larger dimensions creates more pixels without restoring detail that was never captured.

Keep print resolution separate from screen dimensions

Some instructions mention DPI or a physical print size. Those requirements need their own interpretation. A pixel grid describes the image data; a resolution value associates that grid with a physical size for printing. A metadata label should not be treated as proof that the online width-and-height rule has been met. To turn a printed size and DPI into pixels, use the conversion table in the passport size photo in pixels guide.

Browser-generated exports may also set their own resolution metadata. MDN documents 96 DPI for canvas exports in formats that support that field. If a receiving service requires particular print metadata, check it using a suitable editor instead of assuming that changing the kB target sets it.

Before submitting, run the same four checks every time: accepted format, correct pixel dimensions, permitted byte range and complete readable content. That routine is more dependable than repeatedly compressing an image until the upload error happens to disappear.

  • #image dimensions
  • #file size
  • #resize images
  • #upload requirements

Naveed

I build and test the compressor on this site and write practical guides around the file-size problems it solves. Portal limits are checked against official notifications and dated when I review them. About us

Good to know

Frequently Asked Questions

Is a 100 kB image always the same width and height?

No. Many different pixel dimensions can produce a 100 kB file. Format, picture detail and encoding settings affect the bytes. Check the pixel dimensions and the file size independently when a form specifies both.

Why does my exact-size image lose part of the picture?

Mb2KbSizer's exact width-and-height mode uses a centered crop when the source ratio does not match the requested shape. It avoids stretching, but content near the edges can be removed. Prepare the composition before compression if the automatic crop cuts off something important.

Does setting 300 DPI make a photo larger in pixels?

A resolution label alone does not describe or guarantee the pixel dimensions. For an online form, inspect the actual width and height in pixels. If print dimensions and a resolution requirement are also specified, satisfy those separately.

Is it safe to upload my images to Mb2KbSizer?

Strictly speaking, you never upload anything. When you choose a file, the browser reads it from your device and does the resizing and re-encoding in a background worker on that same device. No copy travels to our server or to anyone else's; the only thing our server sends you is the page. A useful side effect is that the browser rebuilds the image from its pixels alone, so EXIF data such as the camera model, the date taken and the GPS location is dropped from the output. That makes the compressed photo safer to share than the original you started with.

What is Mb2KbSizer and what does it do?

Mb2KbSizer is a free image and PDF compressor that runs inside your web browser. You pick a file, type the size you need, such as 100 kB, and it shrinks the file to land at or just under that number. Most people use it for upload forms that reject big files: exam registrations, passport and visa applications, job portals, bank KYC and college admissions. It is just as handy for lightening photos before you email them or put them on a website. There is a [single-image tool](/), a bulk compressor for up to 200 photos at once, and a PDF compressor, all built on the same no-upload principle.

Do I need to install any app to use Mb2KbSizer?

No installation is needed. Mb2KbSizer is a web page, so it works the moment it loads in current Chrome, Edge, Firefox, Safari or Samsung Internet on a phone, tablet or computer. Nothing is downloaded to your device except the page itself, and it does not ask for storage or camera permissions. If you use the tool often, you can add it to your phone's home screen from the browser menu and it will open like an app. It still needs an internet connection to load, though, so treat this as a shortcut rather than an offline program. There is no Play Store or App Store version.

Ready to Compress Your Images?

Enter the file-size limit, then set the required width and height in the format options.

Set image size and dimensions