moved image rendering to the template
removed semicolon which was causing error while initializing