-
Notifications
You must be signed in to change notification settings - Fork 107
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
Module Proposal: Check if image sizes set via code match the actual image sizes #470
Comments
Thanks @pbearne!
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 And yes #24 is the rebuild project for this to be linked to. |
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 |
@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. ? 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. |
Since modules were now split into individual plugins, now it doesn't make much sense to create a standalone plugin that does only little work and then points to another plugin. With that, and #24 not planned anymore, I would also suggest closing this ticket here as a wontfix. |
If I understand this issue correctly, this brings to mind something for Image Prioritizer. Given a page that has collected URL Metrics which include the dimensions for the images used on the page, a background process could generate tailored image sizes for how an image is actually used. Note that the URL Metric data may also need to capture the |
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
The text was updated successfully, but these errors were encountered: