write resized image to cache folder for nginx to use