Project

General

Profile

Actions

Defect #44645

open

Gravatar images are rendered without width and height attributes

Added by Go MAEDA 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
UI
Resolution:
Affected version:

Description

When Gravatar user icons are enabled, the img tags for Gravatar images are rendered without width and height attributes, so no space is reserved for the images until they are loaded. This causes layout shifts, which are especially noticeable on slow networks: for example, the subject of an issue moves to the right when the avatar of the author is loaded. Furthermore, an image that cannot be loaded at all, such as in a closed network where the avatar server is not reachable, takes up no space because its alt attribute is empty.

In r16372, invalid attributes were removed from the Gravatar img tag by excluding :rating, :size, :default, and :ssl from the options passed to image_tag. However, unlike the other options, :size was not rendered as an invalid attribute, because image_tag converts it to width and height attributes. Excluding it therefore also removed the width and height attributes.

The attached patch stops excluding :size, so that image_tag renders the width and height attributes again as it did before r16372.


Files

No data to display

Actions

Also available in: Atom PDF