Hello! I have a form, and in it a button:
<input type="image" src="<?=$a_img_s?>"> Every time I load different url images into it. I need this image to always fit proportionally in width:200 , height:300 . That is, it may be less, but cannot exceed these values. The image should not be distorted, that is, you can not just determine the values of width and height .
I tried to do this:
<input type="image" src="<?=$a_img_s?>"><?if(imagesy($a_img_s)>300){return "height=300;";}?>> However, this did not work, and not at all in proportion. Images may have more height and width. Help something. Thank :)