Add event handler to render images