Skip to content

build_favicons() creates truncated favicon.ico #2978

@peterdesmet

Description

@peterdesmet

A package logo is typically a logo.png file that is higher than wide (i.e. not square). The pkgdown logo for example has a height of 277px and a width of 240px:

Using build_favicons() on such a logo results in a favicon.ico with a truncated top and bottom:

Image

I believe that is because the favicon.ico generator server expects a square input file. If you manually extend the canvas width of logo.png to 277px (resulting in a square file), the favicon.ico looks correct:

Image

Is this something that could be done automatically by build_favicons() before sending the logo.png to the favicon.ico generator?


Note: the other favicons the function generates (e.g. apple-touch-icon.png) don't have this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions