Jump to main content

Nicolas Hoizey

  • articles
  • billets
  • links
  • notes
  • talks
  • archives
  • about

Note from 6 November 2020

  • Nicolas Hoizey
  • 6 November 2020
  • icon, Lighthouse, MDN, PWA
  • 6 reactions

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 reactions

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.
    • 7 November 2020, 00:00
    • Source
  2. Nicolas Hoizey avatar Nicolas Hoizey
    Why not SVG, then?

    And with masks, is it really necessary?
    • 7 November 2020, 00:38
    • Source
  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. github.com/GoogleChrome/l… related issue
    • 7 November 2020, 00:45
    • Source
  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.
    • 7 November 2020, 00:55
    • Source
  5. Nicolas Hoizey avatar Nicolas Hoizey
    Ok, thanks! 👍
    • 7 November 2020, 10:27
    • Source
  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?
    • 7 November 2020, 10:29
    • Source
  • Older: Note from 5 November 2020
  • Newer: Note from 16 November 2020

If you want to share an error or suggest an enhancement of this content, please edit the source on GitHub.

© Nicolas Hoizey

Built with Eleventy