• Hi guys, it’s 2024! All browsers support avif. Firefox since v93, the rest certainly too. I checked the quality difference and it’s astronomical. Only problem is the encoding time: it will HIT your VPS/box cpu badly, beware of capping.

    I successfully hacked the plugin files and it now supports avif on the fly. See my site for proof.

    Only problem is that it’s either one or another. Actually adding avif on top of webp is too large of a task for me alone. Will you consider an update or can i just fork yours and live my life?

    requirements: AVIF Support [GrandPlugins] (a php snippets works too).

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author rosell.dk

    (@roselldk)

    Hi,

    Cool. I have been wanting to add that feature for a while, but life came across that plan.

    You are of course free to fork. It is open source. And it is in the spirit it was created. I actually just want to make it easy for folks to start using the better formats and that way make my contribution to making the world a little better.

    But you are right. It would be preferable with a plugin that handles both formats. I would like to implement AVIF support in WebP Express. I’m however not sure when I will have the time. Things are lightening up, though, so it could be I will get time in a not-too-far future. On the other hand, what I originally had in mind is perhaps overly complex. My plan was to support both at the same time so you could set it up to convert both to AVIF and WebP and have it serve AVIF with fallback to WebP with fallback to jpeg/gif. Such an implementation is probably going to be rather heavy in development time and might be more time consuming that I want to use my time for.

    As it is uncertain when and even if WebP Express will support AVIF, I think it makes sense that you publish your work. At least on github, but you are also welcome to publish on WordPress. If you do submit to WordPress, you should however either be prepared to maintain it or clearly state that it is not going to be maintained. Or perhaps state that it is meant to fill the gap until WebP Express (hopefully) supports AVIF and will only be maintained until that happens.

    I don’t know if you discovered, but I did come so far with AVIF support as to make a new library meant to replace the “webp-convert” library – it is called “image-convert” (https://github.com/rosell-dk/image-convert). It is based on webp-convert, but can convert between many image formats, including avif. If you have a new conversion method for avif, that this library does not already have, I would like to add it to image-convert ?? This will be possible for me, if you publish your work to github. You are of course also more than welcome to implement it directly in image-convert (create a pull request)

    Thread Starter audioscavenger

    (@audioscavenger)

    Thank you for your reply, you make a lot of sense, and I feel you. Sometimes I too get excited with a new project, starts dev and publish, and then go back to the family routine and forget about it.

    Maybe a Github discussion would be better then here…

    Conversion method: well, let’s say I got AVIF 100% working but only because of AVIF Support [GrandPlugins] plugin. It adds the well-known AVIF snippet to enable avif, but also a bunch of hooks and filters to call GD or Imagick, as simple as that. When you upload something, it automatically generates all the matching thumbnails in avif format. You still get the same image format thumbnails, that’s WordPress Core. Nothing new under the sun.

    The real power in your plugin, as I see it, really, is the .htaccess rules. That’s where the magic happens.

    The way I see it, without having you or me re-inventing the wheel, is to simply offer the choice between webp and avif. You cannot offer both, it makes no sense.

    • how would you fallback from avif to webp to original, how many htaccess rules will you need?
    • if your system accepts webp, it likely also accepts avif
    • PHP-Imagick 6.9.11+ supports avif and is likely integrated in most systems
    • webp vs avif is a debate I will not start, but webp is pure crap is what I can tell
    • only downside of avif is the compute power required to generate them

    I think a good chat would be better, to decide the best way to handle this with least amount of effort. Also you have more experience in plugins dev then I do, and already are working on this new plugin converter of yours (not published yet). You should take the lead. I tried renaming all I can in your plugin to get rid of “WebP” in the class/functions/variable names etc but ended up breaking it. Best I could do is alter the “.webp” (webp) and image/webp parts. That’s already a dozen files.

    The controversy I think for most people is whether original files should be converted, for the sake of saving a mere 50% of server space. I think the best method is the vary/rewrite rules. Until we can work with avif natively… ALL major browser support avif as of today, including mobiles. I don’t see the point in holding us back.

    Plugin Author rosell.dk

    (@roselldk)

    I have started a github discussion on the topic here: https://github.com/rosell-dk/webp-express/discussions/605

    You are all welcome to join the discussion

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AVIF support is here!’ is closed to new replies.