Project

General

Profile

Actions

Defect #44645

closed

Gravatar images are rendered without width and height attributes

Defect #44645: Gravatar images are rendered without width and height attributes

Added by Go MAEDA about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
UI
Target version:
Resolution:
Fixed
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

Updated by Go MAEDA about 1 month ago Actions #1

  • Target version changed from Candidate for next minor release to 6.1.6

Setting the target version to 6.1.6.

Updated by Go MAEDA about 1 month ago Actions #2

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r25301.

Updated by Go MAEDA about 1 month ago Actions #3

  • Status changed from Resolved to Closed

Merged the fix into the stable branches in r25305 and r25306.

Actions

Also available in: PDF Atom