Declare Image Dimensions
Problem: Not specifying the pixel height and width of an image forces the mobile device to calculate the values, and consequently increases render times and degrades performance.
Solution: Images such as bitmaps have an intrinsic pixel size. Telling the browser its size in advance prevents the browser from having to re-render the page when it receives the image. Letting the server resize the image cuts down the data transferred and the time it takes for the client to process and scale the image. If the specified width and height attributes match the intrinsic size, then the client doesn’t resize the image.



Sign in or register to reply.