It's terrible for image galleries too, as the images stay in RAM and the memory usage can quickly become insane. Animated GIF galleries are especially bad for this.
Depends on implementation, you could remove the images from DOM when the user has scrolled passed them, and many libraries for inifinite scroll do exactly that.
I mean an image gallery of thumbnails, that lead to the real image. Like you search for a wallpaper with key words and then scroll to infinity and open the interesting ones in a new tab.