Currently, I am implementing the picture element along with srcset to download the same image but in varying resolutions depending on the screen size of the device.
The image has a style of max-width: 100%, causing it to shift the content below when downloaded. Is there a way to instruct the browser to reserve that space using CSS while utilizing srcset?
If a CSS solution is not feasible, I would also appreciate a JavaScript alternative.
Thank you.