replaced img.attr('height') with img.height() 
first returned undefined, because the height referes to the css property
and not the dom element
Merge pull request #575 from naturwerk/akaelin

replaced img.attr('height') with img.height()