Links widget does not generate width or height attributes when showing an image
|Reported by:||mbijon||Owned by:|
|Severity:||normal||Keywords:||dev-feedback 2nd-opinion has-patch|
It's a best practice to include width and height attributes in image tags to prevent reflows when the browser renders the page. Both PageSpeed and YSlow include rules that measure this.
_walk_bookmarks() in /wp-includes/bookmark-template.php does support adding images to the output of the Links widget. However, it doesn't output the width or height attributes.
It is possible to size images with CSS instead of by tag attributes (and PageSpeed rules consider this acceptable). But it doesn't seem ideal to force users to set dimensions in CSS, when the Link edit page doesn't accept CSS directly. Plus, I think it's best to have all the meta info about something in one place, not to set an image in a WP link, and then the dimensions in a theme's CSS file.