When using the core Image module, the height and width of images are automatically set. But when I use the Responsive Images module and a Responsive Image style, then no height or width is set.
Users don't like this because it makes the website look janky because images can pop into place and change the layout suddenly. Google doesn't like this because it slows down the page. When testing with Lighthouse, it gives the following recommendation:
Set an explicit width and height on image elements to reduce layout shifts and improve CLS. Learn more
There was also an article in Smashing Magazine this year about setting height and width.
How can I do this in the Responsive Image module?