Image size matters
As mentioned in the previous chapter, mobile networks have many limitations compared to a wired connection. So, reducing the file size as much as possible is really essential in mobile web development. According to the data (https://developer.yahoo.com/performance/rules.html), 70-80 percent of sites' bandwidth is consumed by the images. Therefore, delivering smaller file size images with acceptable quality to the mobile will always provide a better outcome.
When it comes to image optimization, there are two key factors that you need to always keep in mind. They are as follows:
- Resize your images to correct image resolution
- Reduce the file size.
Resize your images to correct image resolution
There are two methods to measure the size of an image. You can get the image height and width and calculate the physical image size as well as the number of pixels. Also, you can measure the file size by calculating the byte count.
Images that are not appropriately sized will cause...