Crop, resize and compress an image for upload
A photo can have the right dimensions and still exceed a file limit. Separate the framing, pixel dimensions and encoded bytes, then verify the final download against the destination’s actual instructions.
In this guide
Write down the destination’s requirements first
Before editing, read the instructions beside the actual upload field. Record the accepted file formats, required pixel width and height, maximum file bytes and any framing or background rules. A file extension alone does not describe an image. Renaming a PNG to .jpg changes the name, not its encoding. Likewise, displaying an image at a smaller width on a page does not necessarily reduce the file you are uploading.
The following workflow uses a fictional requirement, not a government, school or employer specification: a JPEG at exactly 400 × 500 pixels and no more than 100 KiB, or 102,400 bytes. Treat those numbers as a teaching example. If your destination asks for a different ratio, byte limit, background or file type, substitute its values throughout the workflow rather than assuming a matching-looking photo is sufficient.
Crop the composition before resizing pixels
Cropping selects part of the original image. Resizing changes how many pixels represent that selection. When a landscape photo must become a portrait, shrinking the full landscape into portrait dimensions can distort the subject, while fitting it proportionally may leave the wrong dimensions. Decide what should remain visible first. Keep enough room around the subject, and inspect the framing against the destination’s instructions instead of relying on a preset alone.
Open Image Cropper and choose a supported PNG, JPG or static WebP. The preview uses the browser-decoded orientation. Choose a centered shape, then adjust Left, Top, Crop width and Crop height in whole pixels if the subject is off-center. This version uses precise numeric controls rather than draggable handles. All four values must describe a rectangle inside the source; an overhanging box is rejected instead of being silently clipped.
Work through a concrete 4:5 selection
Suppose the decoded source is 1600 × 1200 pixels. For our fictional 400 × 500 destination, the desired ratio is 4:5. Selecting the centered 4:5 preset keeps a 960 × 1200 region, starting at Left 320 and Top 0. The cropper does not rescale it yet. You can move Left within the remaining horizontal space to change the framing, while keeping the same selected width and height.
Press Crop to PNG and review the output dimensions before saving. The result should be 960 × 1200 for this example. It is a new PNG even when the input was JPEG. The output can therefore be larger in bytes despite containing fewer pixels. Keep the original file separately, and use descriptive names for the intermediate crop and final upload so you do not accidentally select an earlier, larger version later.
Set the required dimensions without unnecessary enlargement
Open Image Resizer with the cropped file, enter maximum width 400 and maximum height 500, and leave enlargement off. Because the crop already has the 4:5 ratio, proportional fitting produces exactly 400 × 500 in this example. For a different input ratio, fitting within those bounds can produce a smaller width or height. Check the actual output dimensions, not merely the numbers you entered into the bounding fields.
Do not enlarge a tiny source simply to make a larger pixel count unless the destination requires it and you accept the visual result. Enlargement cannot recreate details that were never captured. For this workflow you can keep the intermediate output as PNG, then make the final JPEG once in the compressor. Repeated lossy JPEG exports can change the image each time; retain your original and avoid repeatedly recompressing the last downloaded copy.
Choose format and file-byte target separately
Open Image Compressor, select JPG for the fictional destination and choose a target that matches its limit. Our current KB targets are measured in units of 1024 bytes, so 100 corresponds to 102,400 bytes. Some destinations use decimal KB, where 100 KB means 100,000 bytes. If that is your limit, an integer target of 97 corresponds to 99,328 bytes and stays below it when the tool reports that the target was met.
Keep the optional smaller-dimensions setting off when exactly 400 × 500 pixels are required. Reducing dimensions to meet a byte target could invalidate that requirement. Inspect the reported output bytes and target status. If the tool cannot meet the limit at those dimensions, it should say so; do not rename the file, ignore the warning or assume a downloaded file must qualify. Try another quality choice or source while preserving all required constraints.
Verify the file you actually downloaded
Save the final JPEG, open it locally and inspect the subject at a useful zoom. Check for excessive blur, blocky edges or a changed transparent background. JPEG cannot preserve transparency, so confirm the selected background color when converting a transparent image. A small thumbnail can hide damage that becomes obvious after a larger preview or print. The goal is an acceptable image within the requirements, not the smallest possible byte count.
Use the file’s properties and the tool’s actual output dimensions and byte count to compare against your written checklist. Select that final file in the destination form. An image preview in our tool does not prove that another service will accept its format, contents or application-specific rules. Keep the final filename distinct from the source and intermediate files, and retain a copy until the upload is confirmed by the destination itself.
When the upload is still rejected
Read the exact error message before changing more settings. A file may meet the byte cap but have the wrong width, wrong format or unsuitable framing. It may also be a damaged download or an earlier file selected by mistake. Compare one requirement at a time and reopen the final file. If the form names an allowed range rather than an exact dimension, apply that range instead of copying this example’s numbers.
Changing a file to Base64 will not solve a normal upload limit. It encodes the same file bytes as text and generally adds overhead; it is intended for fields or APIs that explicitly request encoded data. Our Image to Base64 tool preserves the original bytes, including metadata. A form asking for a JPEG file normally needs the actual JPEG, not a TXT containing a data URL, and encoding should not be mistaken for compression.
Keep a repeatable local workflow
The cropper, resizer and compressor process supported files in the current browser tab. Selecting an image does not upload it to our server, and the tools do not save the source in browser storage. The page still loads its ordinary resources. Download each result you need before clearing the tool or leaving the tab; the tools do not create an account history or recover unsaved intermediate work for you.
For another image, begin again from the original and repeat the checklist rather than reusing numbers blindly. A different aspect ratio needs a different crop, and detailed content can need a different quality setting to reach the same bytes. The cited browser references explain source-region drawing, image export and byte measurement. Acceptance remains a decision by the destination; this guide provides a reproducible preparation method and a way to inspect the result.
Frequently asked questions
Should I crop, resize or compress first?
Usually crop for the required composition, resize for the required pixel dimensions, then encode or compress for the final format and byte limit. Inspect the final file after every operation that could change those constraints.
Does a 400 × 500 image always fit under 100 KB?
No. Pixel dimensions do not determine the encoded bytes by themselves. Image detail, format, quality and metadata can affect size. Measure the actual file and check whether the tool met your chosen target.
Can I use these numbers for an examination or application?
These are fictional worked-example numbers. Read the current instructions for your own form, including background, subject framing and other content rules. Neither this guide nor a successful local conversion certifies acceptance.
Why does a cropped PNG sometimes have more bytes?
Cropping removes pixels, but the output format may differ from the source. A PNG crop of a JPEG can be larger. Choose the destination’s accepted format and measure the final export rather than predicting size from dimensions.