Note from 6th November 2020

Do anyone know why Google made it mandatory for #PWA icons to be PNG, not JPEG or other?

This is what #Lighthouse requires, but I couldn't find any docs about this. #MDN says other formats are fine.

6 Webmentions

6 replies

  1. Matt Hobbs avatar Matt Hobbs
    If I had to guess I'd say because of the alpha channel availability? Since you don't know where the icon is going to be embedded.
  2. Nicolas Hoizey avatar Nicolas Hoizey
    Why not SVG, then?

    And with masks, is it really necessary?
  3. Paul Irish avatar Paul Irish
    Chrome used to require PNG. But that got sorted a bit ago. We have a change coming to Lighthouse to have it aligned on these PWA requirements.… related issue
  4. Maximiliano Firtman avatar Maximiliano Firtman
    I'm not sure why you might prefer JPEG for an icon but I guess it has to do with platform restrictions. Most underlying platforms use PNG as the icon format and with that the browser doesn't need to touch your icon.
  5. Nicolas Hoizey avatar Nicolas Hoizey
    Ok, thanks! đź‘Ť
  6. Nicolas Hoizey avatar Nicolas Hoizey
    I would prefer JPEG for weight, or even WebP, or SVG when possible.

    I understand PNG is the easiest to support.

    I also know Lighthouse only considers Chrome’s requirements.

    Is there any resource about image formats supported by main platforms for icons?