Fix S3 metadata update to ensure correct image mimetypes and cache control values.