Optimized performance by directly caching images