Open pbearne opened 2 years ago
Thanks @pbearne!
We don't yet have the rebuild function in core so this health check should follow that into core
Can you confirm that this would be a Health Check, or a non-Health Check module? And can you confirm that the "rebuild function" that you're referring to is #24?
cc @felixarntz @adamsilverstein for visibility
Yes, this would be a health check module
If WP doesn't find the image size requested it has to find and sent the next size up So having the right size is a performance boost.
And yes https://github.com/WordPress/performance/issues/24 is the rebuild project for this to be linked to. It would flag that is needs to run
@pbearne Got it, thank you! Since #24 is still being defined, we likely won't be ready to move on this module proposal for some time. I'm going to keep this in the Backlog for now and we can discuss in a future chat as we get a little closer to that module being ready.
cc @jjgrainger @ankitrox
@pbearne Heads up that with the removal of WebP from core, #24 has been put on hold indefinitely, so we can't move forward on this module proposal at this time. Keeping it open and in Backlog for future consideration.
@pbearne Heads up that with the removal of WebP from core, https://github.com/WordPress/performance/issues/24 has been put on hold indefinitely, so we can't move forward on this module proposal at this time. Keeping it open and in Backlog for future consideration.
I still feel like this could be a useful module because it informs users their sizes are not set correctly. We can point to the canonical "regenerate thumbnails" plugin (or a plugin search for that phrase) to help users fix the issue
This module would validate that actual files on the site match the values set and links to the function to rebuild if they don't
@pbearne curious how you were thinking this could be accomplished. For sites with many media items, scanning every image would be costly. A scalable approach might be to only look at the oldest X images to check for correct sizes, or use a sampling approach. Neither would be completely accurate, but would still catch most cases.
What do you think?
As I was planning to look at the file names, we could grab a few folder blobs loop to strip the filename to leave the size string and then add if different. I like the idea of just sampling, starting with the oldest
? are we going to look for images that are not needed or/and check all images we have the image sizes we need for the current theme/setup
We can stop looking once we find a mismatch we don't need a list of all the dif just to know an image is wrong.
Overview
About the module
Purpose
themes and plugins set what image sizes should be created when an image is uploaded This module would validate that actual files on the site match the values set and links to the function to rebuild if they don't
Scope
not planning to look at the actual file size but just check using the filenames
Rationale
We don't yet have the rebuild function in core so this health check should follow that into core
Other