wp-cli / media-command

Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
MIT License
44 stars 41 forks source link

Regenerate webp format #149

Open strarsis opened 3 years ago

strarsis commented 3 years ago

Feature Request

wp CLI media regenerate should also generate the webp format for thumbnails of already uploaded images. WordPress 5.8 added native webp format support. Currently media regenerate regenerates the thumbnails only in jpeg/png format, but doesn't also output them in webp format.

Is your feature request directly related to a specific, existing command? wp media wp media regenerate

Is your feature request about a new command, or a more general idea? The existing media regenerate should be extended so that it can handle a very often occurring case (regenerating webp format from already uploaded media images).

Describe your use case and the problem you are facing Use case: Existing WordPress sites with existing, already uploaded media prior to WordPress natively supporting the webp format. Problem: wp media regenerate currently doesn't regenerate thumbnails (of already uploaded images) for the webp format.

Describe the solution you'd like Some hook/trigger/code inside media regenerate so webp format is also generated for thumbnails.