Passing image data through JS.