Fix slow image rendering from cache.