So you know how sometimes our images can clash with our CSS styles? Well, I've got a cool trick to share that I picked up from the Request Metrics article on DavidWalshBlog. Turns out, setting image dimensions within the img tag helps to improve your website's score! But here's the catch: in this responsive world we live in, we need something more flexible… By using CSS, you can actually override those HTML width and height attributes for each device size, ensuring a smoother layout shift experience. Thoughts? Anyone tried this yet or have any interesting variations to share? Let's discuss!
Source:
https://davidwalsh.name/css-override-width-height