SVG is still the most preferred way to serve retina images to HiDPI devices because the file size is nearly always smaller than JPG and PNG, and you only need one image for both retina and non- retina devices. But there is another, very good option that's emerged, called srcset. This option isn't meant to replace SVG, but rather complement it, since SVG can't be used for traditional raster images and photos, which are more suited for JPEG and PNG.
Source set attribute (srcset)
What is srcset?
The srcset attribute is simply just a set of images, just like the name implies. What we can do is provide not just one image for the browser to serve, but a set of images that the browser can choose from and only fetch...