22

onerob Agree. In my case, I've almost moved my whole workflow to Orion, so this workaround serves some purpose at least.

Vlad I will try to do so over the weekend. Keep in mind that my workaround makes use of a polyfill so it is unrelated to the WebKit engine itself. On the other hand, I am not so sure if they will provide a patch/solution since Apple's port relies the OS libraries and might be marked as "invalid", but it is worth the shot I guess.

    a month later

    Hi, just a little update.

    I am trying to compile WebKit myself with a series of changes. Will see where this leads.

    Regarding @onerob curious finding, this PR might explain why you can decode AVIF in Catalina, but I haven't looked further into it. Maybe Vlad can make sense of it.

      webpsupporter

      Interesting. That would seem to explain it. Further down the thread we had this comment: "Looking forward to deleting this in two years πŸ™‚", which implies that it's a temporary solution. Still, better than nothing.

      I don't think they'd do this for webp as Catalina no longer receives Safari updates (except for security issues) so it would not be seen as something that's needed. Unfortunately.

        Keep in mind that I am still unable to decode AVIF in Mojave.

        On a related note, I finished compiling WebKit. There are some good news and bad news:

        The good news are libavif and libwebp linking statically to WebKit.

        The bad news: none of this makes a difference. There must be some set of flags that activate such function conditionally according to the OS version.

        Sadly I don't know how to proceed at this point.

          So close... Someone in the Webkit community would probably know the extra steps but I'd be way of my depth over there.

            2 months later

            WebP turns out to make more work for users.
            Save the image from the page then send that in email to whoever, they complain the photo in the email sent to them is not viewable.
            So have to open in Preview export as JPG and resend it for their email clients to view it.

              10 months later

              I hit this issue myself opening https://bbc.com on Orion/Catalina. The images are not showing (bbc uses webp). Will going to ask @dino about what are the chances realistically for Orion to support webp on older platforms.

                Vlad This would be great! Right now I have to switch to Firefox on my Mojave/Catalina systems to view more and more sites.

                  dino I love how everything is possible. Also I would imagine it would be incredibly hard and with everything else on our plate we'd need to find proper motivation.

                  Everyone here:
                  One thing we have been considering is making 10.x support Orion+ only. This would enable funding for development of this and other features which are increasingly harder to bring to 10.x (and note the incredible effort that Oriont team is investing to make the version of WebKit in Orion on 10.x be newer than WebKit Safari on Sonoma !)

                    dino Would that be enough? I assumed that ImageIO pre-Big Sur doesn't even know how to parse WebP and therefore one would need to use Google's (or another) WebP library.

                    On the other hand if you insert support for that into WebKit such that WebP is checked first and then fallback to ImageIO only for a non-WebP image, maybe that bypasses the need to recreate kCGImagePropertyWebPDictionary, etc?

                    • dino replied to this.

                      bzgnyc that's exactly what I meant, that we will need to write our own parser for WebP image support (we will need to choose the easiest way from all possible solutions available, as we will need to avoid potential regressions at the same time) πŸ™‚

                        dino Makes sense and was curious if I was reading the situation correctly.

                        Also it might be a good idea in general to have a mechanism to bypass ImageIO when needed if you plan to support OS versions beyond the last three (e.g. Big Sur now and Monterey after the end of the year). If bugs are found in future versions of ImageIO that could be security holes, it will be risky to use Orion with anything other than the last 3 versions of the OS. (e.g. more holes like CVE-2024-23286 but which Apple doesn't back port to older OS). Don't mean to blow this up into something bigger and just mentioning in case it helps with architecting a solution that addresses WebP now as well as future needs.

                        P.S.Since WebKit supports Linux, etc, but Linux doesn't have ImageIO, I assume WebKit already has a mechanism to work with other libraries/without ImageIO? Is there code there you can borrow for older macOS?

                        2 months later

                        Steps to reproduce:
                        β€’ Launch orion version Version 0.99.127.2-beta (WebKit 619.1.1) (latest for now)
                        β€’ Try to view an embeded .webp image
                        β€’ Try to open it in a another tab

                        The image won't load and willl display a "?" icon and when you try to open it in an other tab it will just download the image. When you try to open it with orion with the source file on your mac it won't show either.

                        Version 0.99.127.2-beta (WebKit 619.1.1)

                        Catalina (10.15)

                          Hi Kcraft059 - this is a current limitation of Orion on older OS like Mojave and Catalina. See
                          https://orionfeedback.org/d/1093-add-webp-support-to-orion-on-macos-catalinamojave/17

                          Since Apple didn't include WebP in the libraries/frameworks shipped with those OS and they aren't updating them further (Apple is only doing security fixes back to Monterey and perhaps roadmap items for Sonoma), the authors of Orion have to shoehorn an alternate WebP implementation into the Orion targeted at those OS to make WebP work on them. Possible but requires time/resources...

                            Merged 2 posts from Problem with loading webp image on macos catalina.
                              No one is typing