performance icon indicating copy to clipboard operation
performance copied to clipboard

Enable client side modern image generation

Open adamsilverstein opened this issue 4 years ago • 11 comments

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:

  • https://github.com/WordPress/gutenberg/issues/61447

adamsilverstein avatar Nov 29 '21 15:11 adamsilverstein

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 avatar Feb 02 '22 00:02 adamsilverstein

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

adamsilverstein avatar Mar 08 '22 16:03 adamsilverstein

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

adamsilverstein avatar Mar 29 '22 21:03 adamsilverstein

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.

kleisauke avatar Apr 04 '22 13:04 kleisauke

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.

Richard-TR avatar Nov 16 '22 22:11 Richard-TR

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

johnbillion avatar Mar 13 '23 19:03 johnbillion

Thanks for the context @johnbillion !

adamsilverstein avatar Mar 16 '23 13:03 adamsilverstein

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

adamsilverstein avatar Oct 06 '23 17:10 adamsilverstein

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 avatar Aug 14 '24 11:08 swissspidy

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

  • https://github.com/WordPress/gutenberg/pull/64650
  • https://github.com/WordPress/gutenberg/pull/64784
  • https://github.com/WordPress/gutenberg/pull/64846
  • https://github.com/WordPress/gutenberg/pull/64843
  • https://github.com/WordPress/gutenberg/pull/64796

Currently focusing on:

  • https://github.com/WordPress/gutenberg/pull/64845

swissspidy avatar Sep 11 '24 08:09 swissspidy