Skip to content

Support for offsite image processing #392

@iansvo

Description

@iansvo

Feature Description

Native image processing inside WordPress adds a ton of convenience, but it does inevitably cause more strain on the server. The effect grows more pronounced when processing larger amounts of images, using a smaller (or underpowered) webserver.

While I am not familiar with the implementation in this repo directly, I would imagine this might take the form of some kind of filter and webhook combo so the custom processing mechanism could "listen" for new queue items from the site. There would need to be some similar return mechanism, perhaps another webhook that is just standardized and only in use if the processing happens offsite? Just a few ideas.

Example processing flow

  1. User uploads attachment to media library
  2. Media library determines file is eligible for conversion
  3. Attachment Object is sent to the webhook destination
  4. Once processing completes, new POST made to the site to send back the image and associated attachment meta for update

Why?

While smaller sites are unlikely to need a thing like this, I imagine the burden for a larger publication/blog could be substantial, especially if there are many users making uploads all at once. It might be worth doing some kind of stress test to determine the positive impact of a feature like this, although I'm not sure how that might be done organically.

It's worth noting this is a concern that others have echo'd on the core proposal as well: https://make.wordpress.org/core/2022/03/28/enabling-webp-by-default/#comment-42843

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] EnhancementA suggestion for improvement of an existing feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions