WordPress / performance

Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.
https://wordpress.org/plugins/performance-lab/
GNU General Public License v2.0
355 stars 97 forks source link

Enable client side modern image generation #17

Open adamsilverstein opened 2 years ago

adamsilverstein commented 2 years ago

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:

adamsilverstein commented 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.

adamsilverstein commented 2 years ago

https://github.com/myeveryheart/squoosh-browser looks very promising!

adamsilverstein commented 2 years ago

Another plus of client side image handling might be the ability to properly handle uploaded HEIC files.

kleisauke commented 2 years ago

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.

Richard-TR commented 1 year ago

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.

johnbillion commented 1 year ago

Ancient core Trac ticket on this topic: https://core.trac.wordpress.org/ticket/19770

adamsilverstein commented 1 year ago

Thanks for the context @johnbillion !

adamsilverstein commented 12 months ago

Noting that Gutenberg is exploring adding compression features in this issue: https://github.com/WordPress/gutenberg/issues/55106

swissspidy commented 1 month ago

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.

swissspidy commented 3 weeks ago

A collection of the Gutenberg PRs that have been merged so far:

Currently focusing on: