• SleeplessCityLights@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Maybe this should come with a warning. The purpose of WebP is to quickly serve images to the user without grabbing the entire image data. Without WebP all images will be fully loaded, in the right conditions a page could load real slow.

    • [object Object]@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 months ago

      I love webp, but your explanation is a bit confused. Webp is typically lossy, just as jpeg — only, it’s more efficiently compressed, meaning smaller size for the same image quality. So there’s no ‘entire image data’, there are only different approximations of the original image and different compressed files. Full-blown lossless images in PNG or other formats take several times more data.

      Disabling webp in favor of jpeg would use like 20-40% more data, in comparison. Which still sucks, but not as much.

      • SleeplessCityLights@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        I wasn’t going to get into the whole lossyness of the formats and just simplified to full image instead of compressed formatted. That is interesting that it is only saving 20%-40%. I was under the impression that the page only rendered the image size necessary to fit the layout and not the full resolution image. Forcing it to less lossy or lossless would mean that the larger image would always be available to be served to be rendered without any web request.