Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get 2x favicon in Chrome extension

It seems chrome://favicon/ only allows me to get a 16x16 favicon, and it looks blurry in Retina screens. What if I want to get a 2x retina ready favicon?

like image 706
Angus Zhu Avatar asked Oct 26 '15 14:10

Angus Zhu


People also ask

How to Add favicon to Chrome?

The search box is at the top-left corner of the Chrome web store. Click Add to Chrome next to "Bookmark Favicon Changer." It should be at the top of the search results. A pop-up will appear. Click Add extension.

What is the favicon extension?

<link rel="icon" type="image/svg+xml" href="https://example.com/image.svg"> Yes.

Where are favicons stored in Chrome?

Chrome Favicons are stored in the 'Favicons' SQLite database, within the 'favicons', 'favicon_bitmaps' and 'icon_mapping' tables.


1 Answers

These urls should work:

  • 16px for retina: chrome://favicon/size/16@2x/http://www.apple.com/
  • 48px: chrome://favicon/size/48/http://www.apple.com/

Notes:

  • Some versions of Chrome may always return a 16x16 icon (or a subpar stretched version).
  • Many (most?) sites provide only a 16x16 icon and there's nothing you can do about it.
  • The favicon cache gets an icon only when the corresponding web page is completely loaded.
like image 187
wOxxOm Avatar answered Oct 09 '22 23:10

wOxxOm