I found that img will get broken sometimes recently (like this http://www.underconsideration.com/brandnew/archives/google_broken_image_00_a_logo.gif ). So I just added this part to make sure the img got loaded before rendering. 

Have you encountered this problem before ?