How are the Icons for "top sites" in the firefox new tab rendered?

Solution 1:

Regarding the way Firefox generates Top Site previews, the MDN states:

  1. A global "top sites" list is checked. This list is created by a Mozilla service called Tippy Top. The data store provided by Tippy Top includes an optimized icon for each of the sites in the list; if the site is on this list, that icon is used.
  2. If Tippy Top doesn't include the site, Firefox looks in its Places data store for icons specified in the page's <head> element;

    a. If an SVG icon is available, that icon is selected.

    b. Otherwise, bitmapped icons which are at least 96 pixels wide are considered. If one is found to have a width of exactly 96 pixels, it is used. Otherwise, the smallest image larger than 96 pixels wide is selected.

    c. If no high-resolution icon is found, a screenshot is taken of the site; this screenshot is then scaled and cropped to fit in the space allotted to the icon. If the site also has a favicon, it may be overlaid in the corner of the image.


The high resolution icons—also known as rich icons—are specified by setting the rel attribute to one of:

  • apple-touch-icon
  • apple-touch-icon-precomposed
  • fluid-icon

The size of each icon is taken from the size attribute specified on the <link>, if it's provided. apple-touch-icon and apple-touch-icon-precomposed icons with no size attribute are assumed to be the standard classic iPhone size of 57x57 pixels.

The icon closest in size to 96 pixels is selected. Firefox does its best to avoid having to scale the images, which can result in fuzzy or distorted images, especially at smaller sizes.

There's a note that helped me fix my issue with the large icon not displaying, which was caused by only having a favicon.ico despite it including sizes from 16x16 up to 256x256:

Note: Only "rich" icons (apple-touch-icon and fluid-icon) support the sizes attribute. You can't specify the size for rel="icon" using the sizes attribute.

Solution 2:

This appears to be based on the size of the favicon provided by the website. With a 48 x 48 pixel favicon I saw the small icon at the bottom but it changed to the larger one when I updated my favicon to 512 x 512 pixel png.