title: how to keep original ratio of image within square div
body: <p>I have seen lot of solution about this. The solutions are either for wider or taller image. But my problem is the image which need to keep in ratio, I have no idea it could be taller or wider.</p>