Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the Enable WebP Uploads? module if server does not support it. #65

Closed
mitogh opened this issue Dec 22, 2021 · 5 comments
Closed
Labels
Infrastructure Issues for the overall performance plugin infrastructure Needs Discussion Anything that needs a discussion/agreement [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads)

Comments

@mitogh
Copy link
Member

mitogh commented Dec 22, 2021

Right now there's no information when adding the plugin if my current server supports WebP or not instead of allowing users to enable the module. Instead, disable the module or don't render the module when is not supported, instead, a message can be displayed instead that the module was not activated due WebP is not supported on the current server where the images are being tested.

2021-12-22_15-34

@felixarntz
Copy link
Member

felixarntz commented Dec 22, 2021

@mitogh This would tie into the infrastructure aspect of the overall plugin, and I'm not sure we should disable the entire module in that screen. We could instead show e.g. an admin notice triggered by the module itself if the server doesn't support WebP?

If we decide this should be shown before the module is even active, we would need to define a centralized approach so that a module is able to declare / run certain "requirements" logic even when it is not active - so depending on what we decide here this either becomes a [Focus] Images or Infrastructure issue.

@mitogh
Copy link
Member Author

mitogh commented Dec 23, 2021

Thanks @felixarntz

The main idea is basically to provide feedback to the user in order to allow a user to identify that a module is not active or can't be active because server limitations, instead of allowing users to enable the module even when no real action can happen.

@mitogh
Copy link
Member Author

mitogh commented Dec 23, 2021

Additionally, would be ideal if we say that the webp conversion is not supported prior to WordPress 5.8.0 as the filter image_editor_output_format was introduced after WP 5.8.0.

@felixarntz
Copy link
Member

Additionally, would be ideal if we say that the webp conversion is not supported prior to WordPress 5.8.0 as the filter image_editor_output_format was introduced after WP 5.8.0.

That part should be implicitly covered, since the overall plugin will require 5.8.0 as its minimum WP version (we'll always require the latest WordPress versions since the changes target core, so we'll need to build against the latest version for most modules anyway).

@mitogh mitogh added [Focus] Images [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) and removed Needs Decision labels Jan 4, 2022
@eclarke1 eclarke1 added Infrastructure Issues for the overall performance plugin infrastructure and removed [Focus] Images labels Jan 17, 2022
@eclarke1 eclarke1 added Needs Discussion Anything that needs a discussion/agreement and removed [Type] Discussion labels Jan 17, 2022
@felixarntz
Copy link
Member

I'm going to close this issue due to the conversation above. Furthermore, while the module is called "WebP Uploads", what it introduces beyond that is a new infrastructure to have multiple MIME type versions available for an uploaded image, which is not only about WebP.

I think the checks we have to not attempt to generate WebP files when the server doesn't support it is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issues for the overall performance plugin infrastructure Needs Discussion Anything that needs a discussion/agreement [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads)
Projects
None yet
Development

No branches or pull requests

3 participants