Profile image goes over the text on advance forum in drupal 7
It might not be exactly the answer you're looking for, but using CSS only, you can add this rule to your theme's main css file:

img{
max-width: 100%;
}