Which kind of limit do you have?
A file size limit (in KB or MB) and a pixel size (width x height) are different things. A photo can be small in pixels and still large in KB, or the other way round. If a form gives both, resize to the pixel size first, then compress to the size limit.
For a size that is not listed, use the image resizer for pixels or the online compression tool for KB. Everything runs in your browser, so your images are never uploaded.