I think you mean the image will be stretched? You could do some math in your php to get the image dimensions. Once you figure out x and y of the image you can build a ratio to derive the proper sizes. Check out gd lib (On php.net)
Other solution is remove "width=250 height=250" then it will be in the original size or just remove "height=250", then it will be stretched to width 250px and height will be calculated automatically by browser.