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.

  • 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.