Open adamsilverstein opened 2 years ago
Looks like web support is now available in https://github.com/kleisauke/wasm-vips - we should investigate that as a possible path forward in addition to squoosh.
https://github.com/myeveryheart/squoosh-browser looks very promising!
Another plus of client side image handling might be the ability to properly handle uploaded HEIC files.
wasm-vips v0.0.2 is now available which distributes the web variant in its NPM package. Note that it cannot process HEIC images (via libde265 and libheif), since that includes patent-encumbered HEVC-related logic.
Just a little nudge to say this would be incredibly useful. All existing image optimisation solutions available for wordpress pale in comparison to squoosh. Perhaps even a little menu for setting settings for auto squooshing on upload. Would mean inexperienced users (contributors for example) don't have to mess around with things they don't understand.
Ancient core Trac ticket on this topic: https://core.trac.wordpress.org/ticket/19770
Thanks for the context @johnbillion !
Noting that Gutenberg is exploring adding compression features in this issue: https://github.com/WordPress/gutenberg/issues/55106
The current effort in this regard is centering around bringing (parts of) https://github.com/swissspidy/media-experiments to Gutenberg. Related discussions happened at https://github.com/swissspidy/media-experiments/issues/561 to ensure the code bases are as aligned as possible.
As mentioned in the ticket description, the roadmap can be found at https://github.com/WordPress/gutenberg/issues/61447.
I've been working on an initial draft over at https://github.com/WordPress/gutenberg/pull/64278 that I will continue to iterate on and split into smaller chunks etc.
A collection of the Gutenberg PRs that have been merged so far:
Currently focusing on:
Enable client-side image generation and compression for both new uploads and existing images.
Leveraging parts of https://github.com/swissspidy/media-experiments to build this in Gutenberg initially.
Gutenberg tracking issue: