is it a formatting step that an image goes through when uploaded? I’m tired of converting image after image back into jpg, so if there’s like a step I can take to avoid it being a webp, it would help to know

  • @willya@lemmyf.uk
    link
    fedilink
    English
    204
    edit-2
    1 year ago

    The compression to quality ratio of webp is amazing, especially webm. Some instances have this conversion happen upon upload would be my guess to save a crazy amount of space.

    • setVeryLoud(true);
      link
      fedilink
      301 year ago

      Don’t forget that JPEG-XL is better, yet Google refused to implement it in Chrome to push their own webp format so it’s basically DOA.

      • Vanon
        link
        fedilink
        English
        23
        edit-2
        1 year ago

        It’s super impressive, and not DOA. Apple (unbelievably) announced it will support JXL on Safari and all-the-things. I wish Mozilla would have led the way, but OK. Hopefully this finally pushes Microsoft and Google to support it.

        I’m using XnView to easily batch convert (90-98 quality, 7-8 compression), and have been loving it. Just needs browser and OS support.

    • @BorgDrone@lemmy.one
      link
      fedilink
      171 year ago

      WebP is a tiny bit better on small images and slightly worse overal than JPEG, when using a good encoder library (mozjpeg). It is better than standard libjpeg but that’s not really a fault of the format as much as of the specific encoder.

      • MHLoppy
        link
        fedilink
        28
        edit-2
        1 year ago

        It depends a lot on what’s being encoded, which is also why different people (who’ve actually tested it with some sample images) give slightly different answers. On “average” photos, there’s broadly agreement that WebP and MozJpeg are close. Some will say WebP is a little better, some will say they’re even, some will say MozJpeg is still a little better. Seems to mostly come down to the samples tested, what metric is used for performance, etc.

        I (re)compress a lot of digital art, and WebP does really well most of the time there. Its compression artifacts are (subjectively) less perceptible at the level of quality I compress at (fairly high quality settings), and it can typically achieve slightly-moderately better compression than MozJpeg in doing so as well. Based on my results, it seems to come down to being able to optimize for low-complexity areas of the image much more efficiently, such as a flatly/ evenly shaded area (which doesn’t happen in a photo).

        One thing WebP really struggles with by comparison is the opposite: grainy or noisy images, which I believe is a big factor in why different sets of images seems to produce different results favoring either WebP or JPEG. Take this (PNG) digital artwork as an extreme example: https://www.pixiv.net/en/artworks/111638638

        This image has had a lot of grain added to it, and so both encoders end up with a much higher file size than typical for digital artwork at this resolution. But if I put a light denoiser on there to reduce the grain, look at how the two encoders scale:

        • MozJpeg (light denoise, Q88, 4:2:0): 394,491 bytes (~10% reduction)
        • WebP (light denoise, Picture preset, Q90): 424,612 bytes (~29% reduction)

        Subjectively I have a preference for the visual tradeoffs on the WebP version of this image. I think the minor loss of details (e.g., in her eyes) is less noticeable than the JPEG version’s worse preservation of the grain and more obvious “JPEG compression” artifacts around the edges of things (e.g., the strand of hair on her cheek).

        And you might say “fair enough it’s the bigger image”, but now let’s take more typical digital art that hasn’t been doused in artificial grain (and was uploaded as a PNG): https://www.pixiv.net/en/artworks/112049434

        Subjectively I once again prefer the tradeoffs made by WebP. Its most obvious downside in this sample is on the small red-tinted particles coming off of the sparkler being less defined, [see second edit notes] probably the slightly blockier background gradient, but I find this to be less problematic than e.g., the fuzz around all of the shooting star trails… and all of the aforementioned particles.

        Across dozens of digital art samples I tested on, this paradigm of “WebP outperforms for non-grainy images, but does comparable or worse for grainy images” has held up. So yeah, depends on what you’re trying to compress! I imagine grain/noise and image complexity would scale in a similar way for photos, hence some of (much of?) the variance in people’s results when comparing the two formats with photos.


        Edit: just to showcase the other end of the spectrum, namely no-grain, low complexity images, here’s a good example that isn’t so undetailed that it might feel contrived (the lines are still using textured [digital] brushes): https://www.pixiv.net/en/artworks/112404351

        I quite strongly prefer the WebP version here, even though the JPEG is 39% larger!

        Edit2: I’ve corrected the example with the sparkler - I wrote the crossed out section from memory from when I did this comparison for my own purposes, but when I was doing that I was also testing MozJpeg without chroma subsampling (4:4:4 - better color detail). With chroma subsampling set to 4:2:0, improved definition of the sparkler particles doesn’t really apply anymore and is certainly no longer the “most obvious” difference to the WebP image!

        • Franzia
          link
          fedilink
          31 year ago

          You are like an evil genius? Can you make your own posts about image recompression and how I can get in on this special interest?

          • MHLoppy
            link
            fedilink
            2
            edit-2
            1 year ago

            Hahaha, I think you’re giving me a bit too much credit - I was just curious enough to run some tests on my own, then share the results when I saw a relevant post about it!

            My interest in image compression is only casual, so I lack both breadth and depth of knowledge. The only “sub-field” where I might quality as almost an actual expert is in exactly what I posted about - image compression for sharing digital art online. For anything else (compressing photos, compressing for the purpose of storage, etc) I don’t really know enough to give recommendations or the same level of insight!

            Edit: fixed typo and clarified a point.

      • idunnololz
        link
        fedilink
        28
        edit-2
        1 year ago

        JPEG compression is standardized. The only part of the algorithm that is configurable is the quantization matrix which is essentially a control of what I information to throw away and how much. So unless you are throwing away a huge amount of information (really shitty image), there is no way a different library will somehow save you a bunch of space.

    • @damian101@discuss.tchncs.de
      link
      fedilink
      141 year ago

      Webm is just a video container, not a format. WebP uses quite outdated image compression from the VP8 video codec, which may perform quite a bit better than JPEG at very low quality, but at near-transparent quality, which images are usually encoded to, it very often doesn’t even beat JPEG.

  • @Chronographs@lemmy.zip
    link
    fedilink
    English
    851 year ago

    If something doesn’t support webp you should really be converting it to png not jpg so it doesn’t get more degraded

      • @Chronographs@lemmy.zip
        link
        fedilink
        English
        401 year ago

        Jpg is lossy and throws away information every time it is used, that’s why you get the “deep fried effect” when you re-encode something repeatedly. PNG is lossless so it’s a perfect replica of whatever image you encode with it. It does take up more space however.

        • @LillyPip@lemmy.ca
          link
          fedilink
          14
          edit-2
          1 year ago

          Minor niggle: the ‘deep fried effect’ isn’t because jpg throws away information every time, it’s because the compression algorithm averages pixel boundaries, and that averaging multiplies with each compression pass.

          It can actually bloat the size of the file by adding information – adding data to previously null pixels, whereas png would keep them clean.

          e: it achieves this through pixel averaging (fuzzing), which is why you’ll see grey artefacts bleeding into the pixels around line art. This is magnified with each compression.

          • @Slotos@feddit.nl
            link
            fedilink
            181 year ago

            You’re conflating “data” with “information”.

            Repeated re-encoding loses information. “The compression algorithm averages pixel boundaries” is a perfect example of losing information.
            That it sometimes results in more bits of data is a separate phenomenon altogether.

        • @uis@lemmy.world
          link
          fedilink
          1
          edit-2
          1 year ago

          There is lossless JPEG, but nobody uses it. And there are lossy PNG encoders, and some people use them.

      • Granixo
        link
        fedilink
        34
        edit-2
        1 year ago

        JPEG is for real life photos and document scans, using it for anything else is just lossy compression.

      • Max-P
        link
        fedilink
        271 year ago

        whereas png is better for graphics type elements with defined colors and edges?

        The reason for that is rather surprising, but PNGs are basically zipped BMPs with an optional filter step to arrange the pixels in a way that compresses better.

        And that’s why if you give it a photo with lots of details, it’s not very effective and just gives you a rather big file. PNG barely does anything compared to JPEG and other formats. That’s also why it’s great for small things like icons: it decompresses fast and still manages a fairly good compression ratio when a good chunk of the image is transparent or flat background.

      • @dyc3@lemmy.world
        link
        fedilink
        141 year ago

        Jpg is better for photographs. Png is better when there are a lot of homogeneous pixels, like cartoons or rasterized vector graphics.

      • @eerongal@ttrpg.network
        link
        fedilink
        81 year ago

        Jpg is really bad for anything with sharp lines, such as text. It also doesn’t support alpha channel (transparency) which is reasonably important in modern web design.

        PNG is loseless, which is great for… anything other than storage/bandwidth due to file size. There’s even an animated PNG standard, similar to animated GIF, but you never see that used anywhere.

    • JackbyDev
      link
      fedilink
      English
      471 year ago

      A lot of apps don’t support webp yet. Facebook Messenger is a good example. If I want to share a meme that was webp it says “GIF” in the gallery and says it can’t upload images in that format.

      • boletus
        link
        fedilink
        231 year ago

        So sad that the poor management at Meta can’t find the money to add webp support to one of the most used chatting apps in the world 🥺

        • xigoi
          link
          fedilink
          81 year ago

          They still haven’t managed to find a way they could make $$$ out of supporting WebP.

      • @jacktherippah@lemmy.world
        link
        fedilink
        91 year ago

        Wanna hear something funny? So iirc webp is a Google format. The other day I was preparing slides for class with my friends. Anyway, we were on Google slides. I tried to upload this image, but it says it’s unsupported. So i checked the format and whaddaya know? webp. So a Google service doesn’t even support a Google file format. LOL

      • @gamermanh@lemmy.dbzer0.com
        link
        fedilink
        English
        51 year ago

        I’ve literally only run into 1 program that couldn’t handle webp and that was a FOMOD creation tool for Bethesda game modding, and even then it worked but just tossed an unknown extension error

        Though if you’re using Facebook messenger that’s probably the issue right there lol

          • JackbyDev
            link
            fedilink
            English
            51 year ago

            Honestly this does sound like some goofy Windows feature lol

            • @LillyPip@lemmy.ca
              link
              fedilink
              5
              edit-2
              1 year ago

              You can ‘change’ the extension of any file whose innards match the file type you’re ‘changing’ it to.

              Under the hood, nothing changes. Windows opens it anyway because it reads the actual file data and basically assumes you must be an idiot.

              e: change the file extension of a jpg to txt. Windows shrugs and says okay, if that’s what you really want, and shows you the code. Knock yourself out, it says, I’ll show you what I can, but it doesn’t convert the file.

            • @LillyPip@lemmy.ca
              link
              fedilink
              41 year ago

              No it doesn’t.

              This may be hard to understand if you don’t know how it works, but nothing is being converted. It’s like opening a .docx in a .txt editor. It will show you the data it can, and there’s lots of crossover in image formats.

              Sorry, I can’t explain it better without getting more technical than you can probably understand, but it’s not converting anything.

                • @LillyPip@lemmy.ca
                  link
                  fedilink
                  6
                  edit-2
                  1 year ago

                  Sorry, I didn’t mean to be condescending. Glad it made you laugh, tho.

                  I’m only trying to educate because most people seem to think everything should be a jpg or think it’s all magic (this thread is full of that), and this is one of the few topics I know quite a lot about.

                  Didn’t mean to offend.

                  e: rereading my last comment, I see what you mean. What I meant was it takes understanding of several scientific papers detailing the algorithms (which took me a bit to understand), and I can’t easily condense that into a comment online. Sorry for how that came across.

    • @Treczoks@lemmy.world
      link
      fedilink
      -101 year ago

      Just a few weeks ago, they found a big security flaw in webp and webm. Which affected nearly all programs using it, because they all use the same library.

      Webp and webm are simply not mature enough for professional use.

        • VindictiveJudge
          link
          fedilink
          31 year ago

          I don’t see a reason to convert to jpg even for photos. Its advantages are related to the way compression artifacts looked more natural than the compression artifacts of contemporary formats. Why save as a format that’s prone to obvious compression artifacts at all anymore?

          • brianorca
            link
            fedilink
            51 year ago

            Depends if you are aiming for best quality for a given file size, or if you don’t care how big the file is.

          • @LillyPip@lemmy.ca
            link
            fedilink
            1
            edit-2
            1 year ago

            Jpg has some advantages with photos, because it takes advantage of pixel fuzzing which isn’t visually noticeable in photos and can contribute greatly to higher compression.
            It’s objectively terrible for everything else, though (because of the pixel fuzzing).

      • @uis@lemmy.world
        link
        fedilink
        11 year ago

        Webp and webm are simply not mature enough for professional use.

        They are too old already, lol

    • @PixxlMan@lemmy.world
      link
      fedilink
      131 year ago

      I hate when a new, efficient, fast image format is used by viscous developers to make their evil website load faster and use less bandwidth

      GRRRR

      Yes, JpegXL would’ve been even better, but WebP is good too.

      • @float@feddit.de
        link
        fedilink
        51 year ago

        I still hoping JpegXL will get some traction. The fact that it was removed from Chrome looks bad but they’ll most likely add it again if it does. It’s by far the best of all of them.

        • Quack Doc
          link
          fedilink
          21 year ago

          considering that apple and adope are supporting it in full force now, with DNG even supporting it to compress certain types of data, I have no doubt that Chrome will eventually be forced to re-implement it

      • Quack Doc
        link
        fedilink
        21 year ago

        webp is only marginally better then jpeg in lossy mode, arguably not better due to lack of features, and in lossy mode has many restrictions that make it hard to actually call it lossless in many cases.

    • Dark Arc
      link
      fedilink
      English
      31 year ago

      Discord is such a pain in terms of sticking to ancient stuff and having arbitrary limits.

      I wish it hadn’t taken off like it did… But it was free so ofc…

      • @IronKrill@lemmy.ca
        link
        fedilink
        11 year ago

        The other services at the time had many more limits or annoyances, hence why Discord has the userbase it does today.

  • arthurpizza
    link
    fedilink
    English
    41 year ago

    The jpg format is like 30 years old. Newer formats like jxl, webp, and avif offer much better compression. Right now it looks like webp is the most compatible with browsers so far.

    • Rikudou_SageA
      link
      41 year ago

      You should hate Synology then. Seriously, the format is the best (from technical point of view) widespread image format. You should complain at your software vendor that in the 13 years it has existed, they haven’t had time to implement support. Especially for paid products, like Synology stuff.

    • Turun
      link
      fedilink
      41 year ago

      No, it’s an image compression format derived from the VP8 codec.