Do I have to specify the image dimensions in the html?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
35 views
Do I have to specify the image dimensions in the html, like this speeds up the rendering? What if it's adaptive layout? When adaptive layout, I think it is better not to specify the img size
by | 35 views

2 Answers

0 like 0 dislike
The idea is - if you specify a size, the browser will allocate for the image position on the page and when its loaded will not jump of the displacement elements. When you use high-quality, three-dimensional image, the user can already begin to study textual information on the page and then suddenly BAM, the browser came to the picture, the text read, the user has moved, the user is forced to look where he was reading. However, directly in html to specify the dimensions is not necessary. This can be done in css and to implement adaptivity. A natural question is an abrupt shift in this case can still occur. In order to avoid this, guaranteed there are a variety of techniques. For example critical path css. Returning to the html, with the introduction of picture tag html same got the tools for adaptability. I recommend to study.
by
0 like 0 dislike
To speed up rendering recommended to specify the size or img, or css, whatever. Not recommended to ignore the dimensions of the pictures and also to lie on these dimensions (if you specify 120x120 px to 250x250 px pictures, it is as bad as you don't specify a size at all - will launch the same processes of "re-rendering").

But it was in older versions of Google Page Speed, and now recommend:
- minifirewall all that is possible;
- to manage the download process: to split up css code for headers, footers, side menus - all will be loaded in the same order as you specify and then rendered (if possible - recommended "article" to load first, and then all the navigation and images)
- if possible, use css instead of images in principle.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users