-
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
Visual tool to scan a page and report missing width/height elements #10
Comments
@adamsilverstein I'll add this to the measurement focus for now and into the backlog, but let me know if that should change. |
@eclarke1 @adamsilverstein I think I could take a stab at this - sounds like a fun feature to build out. |
Thanks @dainemawer we can assign this issue to you then and it would be great to move over to 'In Progress' once this is started please |
@adamsilverstein before I move onto this ticket - do you have any thoughts with regards to implementation? Is this something that we would invision living in WordPress, or separate, like a chrome extension? |
Just to note that sometimes authors intentionally omit |
@felixarntz @ThierryA @adamsilverstein @AymenLoukil - I have a minor proof of concept ready here, but I just want to make sure that this is something we actively want to pursue, considering where we currently are with images overall? This feature is blurring the lines between what Lighthouse does pretty well already in terms of flagging images, so I guess my question is - should we rely on Lighthouse and will users know to use it? Or should we looking into incorporating this tool into the plugin? |
@westonruter Just stumbled upon this — maybe a candidate for Optimization Detective? |
@swissspidy Hummm. Yes! Beyond just reporting issues with missing width and height on elements, it can measure the dimensions of those elements and supply the missing |
In the case where an image lacks width/height due to the loaded image having variable dimensions, it will be important that we collect multiple URL metrics for a URL before attempting to supply missing |
As noted in #1420:
So for an image, I believe this would be by getting the With these stored in URL metrics, the optimization pass would then set the missing |
Related to this, I just learned that |
Here's an example portrait video on a 3G connection without Screen.recording.2024-10-15.13.52.38.webm<video controls="" muted="" src="http://localhost:8888/wp-content/uploads/2024/10/goat-18139442-hd_1080_1920_30fps.mp4"></video> And with a Screen.recording.2024-10-15.13.56.46.webm<video controls="" muted="" poster="http://localhost:8888/wp-content/uploads/2024/10/goat-poster-jpg.webp" src="http://localhost:8888/wp-content/uploads/2024/10/goat-18139442-hd_1080_1920_30fps.mp4"></video> And without Screen.recording.2024-10-15.13.59.54.webm<video controls="" muted="" preload="none" src="http://localhost:8888/wp-content/uploads/2024/10/goat-18139442-hd_1080_1920_30fps.mp4"></video> Note what happens when a landscape image is set as the Screen.recording.2024-10-15.14.06.56.webmAll of these layout shifts would be eliminated if we supplied the I've also filed #1592 for setting appropriate |
I'm exploring this in the context of a separate repo at the moment, although I intend to open a PR to implement it as part of Image Prioritizer once it is stable: https://github.com/westonruter/od-intrinsic-dimensions |
This task was suggested by Aymen Loukil for the image focus, however it may fit better in the measurement focus.
The text was updated successfully, but these errors were encountered: