You can also use
One sidenote: having images that are bigger than 2048 x 2048 pixels can break a page on mobile devices as the pics surpasses the graphic memory for mobile browsers. It used to be even less around 1024 by 1024 (older phones). There is a more sophisticated formula, but I memorize those dimensioned as a simple rule of thumb.
I would suggest to cut up the images into squares below that dimensions that is no problem most browsers also optimize for things outside of the viewport to be less process intensive in the paint cycle. If you don’t trust the browser to manage, hiding and displaying squares that are not visible, you can use something like intersection observer being part of Hype Action Events. But that step is totally optional.