Try to reload page, sometimes it's correct, if window was resized, but mostly it will be too far bottom
https://monosnap.com/file/WMlmqn3d4dGkJKszgUJwCzRuIGbWbl
Problem is not in width and height attributes, problem is when height attribute doesn't the same as real height in viewport. For example, it's resized by css or height of container. And this scenario is almost on all complex sites, because images must be responsive. I can't use Scrolltrigger for lazyloading, because I am building gsap app for existed wordpress theme. Lazysizes script is recommended by google and it has one important thing which is not available in Scrolltrigger, it's working correctly on ajaxed elements and dynamic elements and has many addons, like iframe lazyload, background lazy load, support for responsive sizes, etc.
P.s. I can't understand why position is correct if I resize window. Is Scrolltrigger refresed on window resize?
P.s 2 - Added ScrollTrigger.refresh() - no difference. Is any way to make it's working for detecting height after css resizing instead of using height parameters of image?
P.s. 3 - it looks like it's working correctly on first load. But if you reload page, you will see problem. Not sure why it's happening.