You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#524 changes the default behavior of the WebP Uploads module so that it only generates WebP by default, following the core decision, as that is a safer default.
However, the module still offers the alternative approach of generating both WebP and JPEG files. At a high level, this comes with the following tradeoff:
Pro: Better backward/cross compatibility since any use-case where WebP is not supported can still leverage an equivalent JPEG.
Contra: Large filesystem storage needs, since now every size requires two files, effectively almost doubling storage requirements.
While for a WordPress core implementation this decision would likely not be exposed as a user-facing control, for this plugin it makes more sense. It also would be applicable if WebP became a "canonical plugin".
Once #524 has been implemented, we can proceed with this one. It could work as follows:
A new WordPress setting is registered to control whether to output both WebP and JPEG (e.g. generate_webp_and_jpeg), which could be a simple boolean value.
A UI control (checkbox) for the setting could be added under "Settings > Media" in the "Uploads" section.
Label could be Generate JPEG files in addition to WebP
It would be good to add a brief description below that explains the tradeoffs, e.g. Enabling JPEG in addition to WebP can improve compatibility, but will effectively double the filesystem storage use of your images.
#524 changes the default behavior of the WebP Uploads module so that it only generates WebP by default, following the core decision, as that is a safer default.
However, the module still offers the alternative approach of generating both WebP and JPEG files. At a high level, this comes with the following tradeoff:
While for a WordPress core implementation this decision would likely not be exposed as a user-facing control, for this plugin it makes more sense. It also would be applicable if WebP became a "canonical plugin".
Once #524 has been implemented, we can proceed with this one. It could work as follows:
generate_webp_and_jpeg), which could be a simple boolean value.true, the default value of thewebp_uploads_upload_image_mime_transformsfilter should be changed so that it outputs bothimage/jpegandimage/webpfor bothimage/jpegandimage/webpinput format (effectively the same as it was prior to Modify WebP default behavior to follow latest decision (generate only WebP for JPEG) #524).Generate JPEG files in addition to WebPEnabling JPEG in addition to WebP can improve compatibility, but will effectively double the filesystem storage use of your images.