There's an issue I'm experiencing where images take a moment to load when the page loads. This not only affects the appearance but also interferes with the functionality of a scroll-up button that needs to be positioned at the bottom of the page once scrolled down - however, since the images don't occupy any space on page load, the JS calculates the page length incorrectly. Typically, you would set height and width directly on the image, but in this case, image dimensions change based on screen width (as seen in the mobile example above where the image is fluid). Therefore, setting a fixed width/height based on breakpoints isn't feasible.
Is there a solution available to dynamically adjust the image height based on its width?
To clarify why I need to absolutely position my scroll button: