Context: Even though Chromium has native support for AVIF, a very nice image format, Microsoft goes out of their way to remove it from Edge, which is a chromium fork. Jpeg XL (JXL) (not to be confused with Jpeg (JPG) or Jpeg 2000 (jpg2k) ) is another nice image format, which, IIRC, is only supported in Firefox.

    • /home/pineapplelover@lemm.ee
      link
      fedilink
      arrow-up
      58
      ·
      10 months ago

      Png because it’s lossless and pretty universal. Svg is pretty cool because it’s vectorized but it’s also a pain to make good svg.

        • mlg@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          ·
          10 months ago

          Animated PNG actually does exist but it has poor support coverage.

          I remember using it to make whatsapp animated stickers

          • lud@lemm.ee
            link
            fedilink
            arrow-up
            5
            ·
            edit-2
            10 months ago

            All major browsers (98% of all users) have supported APNG since at least 2020

            Firefox: 2008.
            Safari: 2014.
            Chrome: 2017.
            Edge: 2020.

            https://caniuse.com/apng

            I believe the photo app in Win 10 (and maybe 11) still doesn’t support it but that shouldn’t hinder web devs.

    • TxzK
      link
      fedilink
      arrow-up
      28
      arrow-down
      8
      ·
      10 months ago

      WebP cause small size, can be transparent, can be animated, can use either loseless and lossy compression. Also it pisses of many people which is funny to me.

      • drkt@feddit.dk
        link
        fedilink
        arrow-up
        29
        arrow-down
        1
        ·
        edit-2
        10 months ago

        If you want to piss people off, support JPEG XL

        Every time you mention it, Google shills WebP supporters come out of the woodworks to do their song and dance!

        • renzev@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          edit-2
          10 months ago

          I’'m working on a website right now, trying to choose which image format to use. I think I’m gonna store both webp and AVIF versions on the server, and have Javascript figure out which format is best for the browser automatically (for images that have to be loaded with Javascript anyway).If I have time, I might even try detecting if JXL is supported via third-party extension and using that too.

          • drkt@feddit.dk
            link
            fedilink
            arrow-up
            6
            ·
            edit-2
            10 months ago

            have Javascript figure out which format is best for the browser

            Please don’t- HTML has native image fallback functionality https://www.w3schools.com/TAGS/tag_picture.asp

            
                 
                 
                 
            
            

            I don’t know if type=“image/jxl”> is the correct type but I’m halfway out the door right now, sorry! You may have to look that up :p

            • renzev@lemmy.worldOP
              link
              fedilink
              arrow-up
              3
              ·
              10 months ago

              Thanks for the info! I was already suspecting that this could be done without JS, just didn’t know how.

      • renzev@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        2
        ·
        10 months ago

        The pissing people off part is why I post all my memes in webp haha

      • renzev@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        Do you write postscript by hand? I once got the change to take a postscript programming class, but sadly I didn’t (I wish I did tho). How does it compare with SVG? I know SVG has a lot of limitations (for example, you can’t change the color of a shape filled with a pattern), so I guess eps’ turing completeness lets you overcome things like that, since you can just program in whatever functionality you need?

    • gens@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      Now BC7 because i’m playing with graphics programming. Usually… png i guess because it’s simple.