RSS icon feed-small.png

Created on 3 June 2021, almost 4 years ago
Updated 2 March 2024, about 1 year ago

The RSS icon img tag does not define width and height resulting in a less than optimal lighthouse performance score.

May I instead of fixing it this way propose to just replace the PNG icon with the Simpleicons CC0 licensed RSS svg icon?

This has 2 advantages:

  1. If a class is added, the icon easily can be themed.
  2. The PNG file is 521 bytes, the svg is 400 bytes, when both the server and browser support gzip it will be 279 bytes and with default brotli compression the size is only 257 bytes. That is half the size. Every byte counts for a faster user experience and ranking in search engines.

This is how the html code may look like

<svg class="icon">
  <title>RSS feed of $ITEM</title>
  <use xlink:href="/modules/contrib/sitemap/images/rss.svg"/>
</svg>

And css:

.icon {
  width: 12px;
  height: 12px;
  fill: $THEME_COLOR;
}

PS: I would not inline the svg code as with HTTP/2 this is not necessarily a speed improvement and it means the file can't be cached.

Feature request
Status

Active

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024