improved caching of image upload