After using lazyload, when you need to scroll the page to an element location, the positioning is not accurate, how to solve it?

as mentioned in the title, after using lazyload, the height of the page changes constantly during the picture loading process, and it is always inaccurate to navigate to a location (using js positioning) when you want to open the page.
the current solution is to add a fixed height to all images or their parent elements, but this always doesn"t feel good. What we do is an h5 page, and most of the time the height and width are not necessary, or even none.
is there any way to solve this problem? From a design point of view and from a code point of view, any approach is fine. Thank you ~

Mar.14,2021

the parent of the picture is fixed in height


I also encountered this problem, using the react-lazyload npm package. Not solved

Menu