instead of rendering a seperate preview object, lets render all the images as a data attribute and then load the first image only