Set width and height attributes to img automatically
When you test your webpage on Google's speed tool lighthouse, it shows that images don't have explicit width and height attributes. Warning: "Image elements do not have explicit width and height". I have read that this can affect Cumulative Layout Shift value, which involves SEO/Performance marks directly. Would be a good feature just to add this to every image we add to Oxygen? I can do this manually now, on attributes setting data and value respectively but it's a bit clunky to do it one by one. I just set it to 100% so it doesn't affect my width and height setted previously but avoid the Google warning on lighthouse. My only concern is that when you add this to an image, the 'size' is modified on the backend visually, but it's showed correctly on the frontend. So the idea is to do this after you finish the website, when you are optimizing. Backend view: Screenshot 1: Left image has attributes. Right doesn't.  Frontend view: Screenshot 2: Left image has attributes. Right doesn't. 
Posted by JandJElche on Dec 2, 2020, 10:05 AM
Tags
Related issues
- > when it's much easier to just build a nice website using JavaScript I'm currently building a web-based tool that uses dynamic forms fo...
- Going forward with the TileMap editor
- Just remember that many popular stacks are due to marketing; often the marketing pushes you in ways that are highly profitable for whoeve...
Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments
ux (Marketing)
> when it's much easier to just build a nice website using JavaScript I'm currently building a web-based tool that uses dynamic forms fo...
Going forward with the TileMap editor
Just remember that many popular stacks are due to marketing; often the marketing pushes you in ways that are highly profitable for whoeve...
Set width and height attributes to img automatically
Set width and height attributes to img automatically
When you test your webpage on Google's speed tool lighthouse, it shows that images don't have explicit width and height attributes. Warning: "Image elements do not have explicit width and height". I have read that this can affect Cumulative Layout Shift value, which involves SEO/Performance marks directly. Would be a good feature just to add this to every image we add to Oxygen? I can do this manually now, on attributes setting data and value respectively but it's a bit clunky to do it one by one. I just set it to 100% so it doesn't affect my width and height setted previously but avoid the Google warning on lighthouse. My only concern is that when you add this to an image, the 'size' is modified on the backend visually, but it's showed correctly on the frontend. So the idea is to do this after you finish the website, when you are optimizing. Backend view: Screenshot 1: Left image has attributes. Right doesn't.  Frontend view: Screenshot 2: Left image has attributes. Right doesn't. 
Comments (0)
No comments yet. Start the discussion.