Resize and compress images for upload
Separate pixel requirements from the upload limit. A form can reject a small file because its width is wrong, or reject correctly sized pixels because the encoded file is too large.
Practical example and workflow
Practical example
For a hypothetical 1200 by 800 photo needed at 600 by 400, lock the aspect ratio and halve the width. Then set the upload limit. Reducing both dimensions by half leaves one quarter of the pixels to encode.
Workflow and checks
Read the destination requirements first. Set the final dimensions, select a supported output format, then apply compression. Inspect the downloaded result rather than assuming the preview meets the form rules.
Before submitting your image
Open the downloaded file and confirm its format, dimensions and byte size. Inspect small text and edges at full size. Keep the original so another export does not require recompressing a lossy copy.
When the upload form asks for two different sizes
You have probably seen a form ask for a photo in pixels and then give a separate limit in KB. Those numbers describe different things. Pixels describe the canvas; KB describes the saved file. Changing one may help with the other, but it does not prove that both requirements are satisfied.
Write the requirements down before editing. If the photo needs a different shape, crop it first. Then set its dimensions and compress the final canvas. This saves you from repeatedly exporting a photo that was the wrong shape to begin with.