Skip to content

Add favicon48 prop to iconPaths option to define a favicon to show in Google search result #5041

@StaymanHou

Description

@StaymanHou

What problem does this feature solve?

Currently the plugin only generates favicon16 and favicon32 tags when compiled. That works fine for browsers but doesn't comply with the Google search appearance guidelines for defining a favicon. - https://support.google.com/webmasters/answer/9290858?hl=en

The guidelines specify that a valid favicon must be a multiple of 48px square. Please provide a option to generate a 48x48 favicon tag.

What does the proposed API look like?

pwa.iconPaths

{
  favicon48: 'img/icons/favicon-48x48.png',
  favicon32: 'img/icons/favicon-32x32.png',
  favicon16: 'img/icons/favicon-16x16.png',
  appleTouchIcon: 'img/icons/apple-touch-icon-152x152.png',
  maskIcon: 'img/icons/safari-pinned-tab.svg',
  msTileImage: 'img/icons/msapplication-icon-144x144.png'
}

And generate <link rel=icon type=image/png sizes=48x48 href=img/icons/favicon-48x48.png>

Activity

LinusBorg

LinusBorg commented on Jan 8, 2020

@LinusBorg
Member

@sodatea this seems like a good idea. Agree? Then I'll do a PR

haoqunjiang

haoqunjiang commented on Jan 9, 2020

@haoqunjiang
Member

Looks good 🙂

self-assigned this
on Jan 9, 2020
removed their assignment
on Mar 10, 2021
linked a pull request that will close this issue on Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @LinusBorg@haoqunjiang@StaymanHou

      Issue actions

        Add favicon48 prop to iconPaths option to define a favicon to show in Google search result · Issue #5041 · vuejs/vue-cli