A web image should be large enough for its intended display but not so large that visitors download unused pixels. Start from the actual layout dimensions.
What should you consider?
WebP can be useful in modern web workflows, while JPG remains a practical general-purpose option and PNG remains useful for transparency.
Practical workflow
Start with the destination requirement, make a copy rather than overwriting an important original, and compare the output at the size where it will actually be used. If the file is still too large, consider whether resizing, compression or a different format solves the real problem.
Related tool
Tip: The smallest file is not automatically the best file. Compatibility and visible quality matter too.