Project

General

Profile

Actions

Defect #44645

closed

Gravatar images are rendered without width and height attributes

Added by Go MAEDA 23 days ago. Updated 18 days 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

Actions #1

Updated by Go MAEDA 20 days ago

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

Setting the target version to 6.1.6.

Actions #2

Updated by Go MAEDA 19 days ago

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

Committed the patch in r25301.

Actions #3

Updated by Go MAEDA 18 days ago

  • Status changed from Resolved to Closed

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

Actions

Also available in: Atom PDF