Adds image and array to js.