You can make your website faster and less data hungry by using images with dimensions that match the display size. In other words, give images the right width and height when you save them.
srcset is magic which makes it happen.
Save multiple sizes for each image and use the srcset attribute to enable the browser to choose the smallest. The w value tells the browser the width of each version.
#reactjs #webdevelopment #js #imageoptimization #javascript #html