theme('image', ...) should be used here instead of manually creating the img tag, and the explicit styles should be removed and put into the .css. I'd also strongly prefer that this be done in 7.x-3.x first, to ensure that improvements in the code base get propagated forward.