Fav for Craft CMS

Installation

Requirements

  • Craft CMS 5.3 or later
  • PHP 8.2 or later
  • GD or Imagick — whichever Craft is already using. Imagick is needed only for an SVG source.

Install

From the Plugin Store, or:

composer require justinholtweb/craft-fav
php craft plugin/install fav

Fav is free. There are no editions, no licence key and no licensing code in the plugin.

Your first icon set

  1. Go to Fav → Icons in the control panel. In a multi-site install, pick the site from the switcher at the top.
  2. Choose a source image: a square PNG, 512×512 or larger, with transparency if the artwork has any.
  3. Set the theme, background and tile colours, and a padding if the logo runs edge to edge.
  4. Save.

Fav generates the whole set and, from the next page load on, adds the tags to the head of every front-end page. There is nothing to add to a template.

Deploying

Generated icons are files, not database rows, so a fresh deployment arrives with the settings but without the icons. Add one line to the deploy script, after migrations:

php craft fav/favicons/generate

It only rebuilds what is missing or out of date, so it is cheap to run on every deploy.

Permissions

One: Manage favicons. Without it a user does not see the Fav section. A user can manage the icons only for sites they are allowed to edit.