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

  • Chronographs@lemmy.zip
    link
    fedilink
    English
    arrow-up
    87
    arrow-down
    2
    ·
    1 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

    • JohnDClay@sh.itjust.works
      link
      fedilink
      arrow-up
      17
      arrow-down
      2
      ·
      1 year ago

      Isn’t jpg more efficient for pictures, whereas png is better for graphics type elements with defined colors and edges?

      • Chronographs@lemmy.zip
        link
        fedilink
        English
        arrow-up
        40
        ·
        1 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
          arrow-up
          16
          arrow-down
          2
          ·
          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
            arrow-up
            17
            ·
            1 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
          arrow-up
          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@feddit.cl
        link
        fedilink
        arrow-up
        35
        arrow-down
        2
        ·
        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@lemmy.max-p.me
        link
        fedilink
        arrow-up
        25
        arrow-down
        1
        ·
        1 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
        arrow-up
        14
        ·
        1 year ago

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

      • amio@kbin.social
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        PNG is lossless and JPEG is not. JPEG is about a sliding scale of “quality” (at the cost of file size) and minimizing how much it fucks with the visual end result.

          • amio@kbin.social
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            This comment was basically inevitable. Broad strokes for what the vast majority of cases will be, is my defense :p

      • eerongal@ttrpg.network
        link
        fedilink
        arrow-up
        7
        ·
        1 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.

      • LillyPip@lemmy.ca
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        (I accidentally responded to the wrong comment before.)

        Yes, that’s exactly right.

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

        Efficient, perhaps, but the tiny compression gain vs png isn’t worth the horrible loss in quality of jpg compression for web images.

        Jpg is good for photos where the variance between adjacent pixels is very high, but for contiguous images (like most web images), png gives very high lossless compression and is almost always superior to jpg’s very lossy compression.

  • harmonea@kbin.social
    link
    fedilink
    arrow-up
    43
    ·
    1 year ago

    if there’s like a step I can take to avoid it being a webp

    Formats are chosen by the uploaders and hosts, not the end user.

    For easy conversion of images from the web, I recommend the FF addon Save webP as PNG or JPEG. Anytime you open an image in its own tab, it pops up with a menu that gives you a quick button to choose the format you’d like to save it in.

    • IphtashuFitz@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 year ago

      In some cases it’s chosen by a third party.

      My employer uses Akamai for CDN, security, etc. One of the optional services they offer is called Image and Video manager (IVM). One of the things IVM does is analyze image files and converts them to multiple target formats based on how you set it up.

      Suppose you have an image on your website that is a 1000x1000 pixel PNG file that’s 500k in size. The first time a client fetches it Akamai will serve it as-is but will also hand off its URL to an image processing server. That server will analyze the image, and based on how you configure it, might create multiple JPEG & WEBP formats that are 250x250, 500x500, and 750x750 in size, as well as 1000x1000. The new images are highly optimized without impacting the perceptual quality, and all smaller than the original images size.

      Once these images are created Akamai adds them into their CDN cache alongside the original image. Now when a client requests the original PNG file they may actually serve one of the other versions based on the browser being used and device characteristics like viewport size, etc. But it’s all 100% transparent to the end user.

      https://www.akamai.com/products/image-and-video-manager

      • harmonea@kbin.social
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        1 year ago

        You’re not wrong of course, but I really need people to understand that this level of detail is not what a top-level reply to a lower-end technical question is aiming for. Maybe this will be helpful to someone, but I already knew it and didn’t need it sent to me, and it’s going to go above OP’s head. For the average end user, this is abstracted somewhere in the “host stuff” layer, and that’s fine.

    • PeleSpirit@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      29
      ·
      1 year ago

      I just change .webp to .jpg and it works fine. I’m not sure what that does though or even if it’s necessary.

      • harmonea@kbin.social
        link
        fedilink
        arrow-up
        57
        arrow-down
        2
        ·
        edit-2
        1 year ago

        Yeah, doing that does absolutely nothing. Your image viewer still reads it as the webp it is, and it knows to do so seamlessly because it’s reading the file header (the first few bytes of the file) instead of the file extension.

        For an analogy, you’re basically just putting a wig on it and pretending it’s your girlfriend from the next school over when everyone in the room knows it’s your skeezy neighbor and is just humoring you.

        • PeleSpirit@lemmy.world
          link
          fedilink
          English
          arrow-up
          10
          arrow-down
          3
          ·
          1 year ago

          If it tells you it doesn’t accept webp and you change it to jpg and it works, I guess it’s doing something, lol. I’m sure it doesn’t change the file type, it’s a loophole.

          • NullPointerException@lemm.ee
            link
            fedilink
            arrow-up
            6
            ·
            1 year ago

            fair but “it” here is pretty vague. my guess is that, in your case, whatever part of “it” that processes the image handles webp files just fine but for some reason the devs made “it” reject file extensions that don’t match “.jpeg”, “.png”, “.whatever_else” for some reason before the file gets handled further.

            • PeleSpirit@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              1 year ago

              Even if a webp is still accepted, I still have that distrust though. The marketing people should have let everyone who works with pics know what they are. I use non-standard software so maybe that’s why I’m clueless as to what it actually does. Again, I’ve got a lot on my plate so it never really comes up as first priority to figure out what it is.

              Edit: I thought you were someone else, sorry about that. Still leaving it since it’s still valid, lol.

              • Turun@feddit.de
                link
                fedilink
                arrow-up
                4
                ·
                1 year ago

                It would be helpful for the discussion if you would tell us what the mystery program is, that is handling images in this strange way and what operating system you are on.

                • PeleSpirit@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  1 year ago

                  I don’t remember, it was a while ago. I’m on windows 10 and I use Affinity for all photo editing. I think it had something to do with a header for a site, that’s the distant memory anyway. That’s kind of my point, I remember the distrust but not the circumstances. As I told someone else, I’m not trying to bust anyone’s balls, feel free to ignore me. I’m just trying to give you the every man perspective. It is just mine and only one perspective.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      49
      arrow-down
      1
      ·
      1 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@sh.itjust.works
        link
        fedilink
        arrow-up
        24
        arrow-down
        1
        ·
        1 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 🥺

      • jacktherippah@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        1 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
        arrow-up
        14
        arrow-down
        9
        ·
        1 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

            • LillyPip@lemmy.ca
              link
              fedilink
              arrow-up
              6
              arrow-down
              1
              ·
              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
              arrow-up
              5
              arrow-down
              1
              ·
              1 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.

              • PeleSpirit@lemmy.world
                link
                fedilink
                English
                arrow-up
                6
                arrow-down
                6
                ·
                1 year ago

                I know it doesn’t convert, lol. It’s a loophole to get around places that don’t accept webp as an extension. It still reads it just fine. Thanks for the condescending attitude though, it made me laugh.

                • LillyPip@lemmy.ca
                  link
                  fedilink
                  arrow-up
                  7
                  arrow-down
                  1
                  ·
                  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.

    • Dark Arc@social.packetloss.gg
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 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
        arrow-up
        1
        ·
        1 year ago

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

    • PixxlMan@lemmy.world
      link
      fedilink
      arrow-up
      13
      ·
      1 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
        arrow-up
        5
        ·
        1 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@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 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@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 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.

  • arthurpizza@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 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_Sage@lemmings.world
      link
      fedilink
      arrow-up
      4
      ·
      1 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.

  • willya@lemmyf.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    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);@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      1 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.