I am building a responsive website. This website needs a lot of background images (both vector and raster formats).
I want to optimize the website for loading speed but not decrease picture quality.
My understanding is that I should have different versions for the same picture so that for small window devices the user automatically downloads the correct smallest file size.
My question is: What is the best way to deal with this problem? Do I need to use media queries? how to use them such that different browsers actually don't download unnecessary data?