I upload the image to my site. Image has width is 498 and height is 402.
I need to make a preview image with the established maximum width of 250px and a maximum height of 250px, but the image should be 250 to 250, and must be proportional to the width of 250 pixels.
How to do it?
EDIT
I upload images to your server. The limit on the size I want to make 250 in width and 250 in height.
This does not mean that if I upload an image 1000h500, then it must do 250×250, which means that the width we’re doing 250 pixels and the height is proportional to the first dimension is 125. In the end, I should get a picture 250×125.
Second example: I have an image 100h800. I mean it should be changed
1 Answer