Add SVG icon metatag to Favicon module

Created on 10 July 2025, 2 days ago

Problem/Motivation

Many modern browsers now support SVG favicons, which have the benefit of more easily supporting higher resolutions or larger icons. It would be nice to add support for this tag to the Favicons submodule. This could then be combined with using more traditional icon tags already supported by Metatag to provide suitable fallbacks to older browsers.

Steps to reproduce

  1. Enable Metatag and Metatag Favicons submodule.
  2. Edit a Metatag type, e.g. Global.
  3. Verify there is no SVG icon tag.

Proposed resolution

Add an svg_icon plugin to metatag_favicons module. The plugin asks the user to input a path to an SVG image and produces the following HTML output with a weight of 2: <link rel="icon" href="/path/to/favicon.svg" type="image/svg+xml">.

Remaining tasks

  1. Write MR.
  2. Review MR.
  3. Commit.

User interface changes

Adds a new "SVG icon" metatag to the "Favicons & touch icons" group.

API changes

None.

Data model changes

New svg_icon metatag added to schema of metatag_favicons.

✨ Feature request
Status

Active

Version

2.1

Component

Other tags

Created by

πŸ‡©πŸ‡ͺGermany FeyP

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024