If the ``++width++`` and ``++height++`` attributes are set, the space required for the image is reserved immediately by the browser, even before it actually starts to load the image.
Without those attributes, the page layout constantly changes as images are loaded until they are all loaded, which can disorient users.
=== on 26 Jun 2013, 15:13:12 Dinesh Bolkensteyn wrote:
Let's also apply to <input type="image" /> tags
=== on 8 Jul 2013, 18:18:55 Freddy Mallet wrote:
Is implemented by \http://jira.codehaus.org/browse/SONARPLUGINS-3001
=== on 30 Nov 2018, 11:21:44 Nicolas Harraudeau wrote:
Reverting the rule name to "Image tags should have "width" and "height" attributes" (removing the requirement for buttons) as this rule's implementation does not check buttons and there has been no request or complains from community.
Note also that this rule is not enabled on Peach nor on Next, and it is not part of Sonar-Way. Thus the value of this rule seems quite dubious to me. Especially as it is quite common to define the width and height of images in CSS files.
\[~alexandre.gigleux] Shouldn't we deprecate such a rule?