The steps involved are as follows:
- Navigate to the Chapter02/imageresize folder.
- The package.json file contains the necessary models for our Node.js Cloud Function.
- The config.json file contains the dimensions for the resizing to three different form factors.
- The following Node.js code is triggered whenever a file is uploaded to a bucket specified during the function creation. It performs the following functions:
- If the uploaded image is not an image, no action is performed
- If the image name starts with CR_, then the file is ignored as it has already been resized by this function
- Deletion and metadata change events are ignored
- The image file which is to be modified is resized to three different sizes using the sharp module ...