get random images across pages optimized