Yes. You can break out your calculator and calculate new H and W values to scale the picture to any size while maintaining aspect ratio. If you get either the H oe the W wrong you will distort the image.
Or you could specify only the H or only the W and never ever ever post a distorted image, without having to do a hand calculation to maintain aspect ration.
Do feel free to do it the hard way.
If it’s all the same to you, I’ll continue teach the simple bulletproof method.
You are welcome to include any complex and unnecessary steps in whatever you do.
Of course, your method also requires that your source specify both H and W, and not all posted images include that information, leaving you to guess the aspect ration and/or height and or width.
Me? I just post the image, I don’t do calculations, I never accidentally squash or stretch an image, if the image is too big or too small I specify Height=300 (for FR, 300 is about right) typing in 11 characters rather than Height=300 Width=(where did I put that calculator? ah yes, mumble mumble, uh) 372. That’s 21 character in the HTML, plus some number of keystrokes on the calculator, plus the possibility of distortion in the final image.
K.I.S.S.