renderPlot: send height and width along with image
Add renderImage function