Added image loading functionality on window resize