I am building a web page and its is a product customizer. So I need many images. On average if I compress the photo of each combination it is going to be 100kb. They are JPG. Any more compression and artifact starts popping up.
1500 total combinations (got that from Rule of Product) * 100kb = 150Mb for a single page.
Not sure if this metric is true or not, but I heard Entire websites on average are 150Mb. I have a Single page that has 150Mb worth of photos.
Only one photo is going to be displayed at a time. The rest are display:none;
Although I read that even on display:none
images still take up bandwidth.
I still have to consider Javascript logic I have to put through. Will this hurt performance? Every time a person changes a radio button, it has to loop through all the images. finding the the correct image with an alt tag that contain the values of each radio button input.
- Event Listener for onChange of radio button
- Then looping through all the photos, where the alt tag of that images contains the values of the radio button, thus showing the correct image.
Any advice is appreciated.