How to resize bbcode linked image to fix within the current div height and width?
<p>Hi I have a comment posting function where public user can link and display images using </p>

<p>Something like [img]http://www.google.com/img.png[/img]</p>

<p>Issue is that user may link to an image that is of extremely large height and width which is more than the height and width of the div it is in causing some overflow layout issues</p>

<p>Is there anyway I can resize the image such that it still fit in the div without losing the aspect ratio?</p>

<p>Alternatively can I use CSS something like set overflow to display scroll bar if that happens?</p>
