You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extensions/image-processing-api/README.md
+51-10Lines changed: 51 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,23 @@
4
4
5
5
**Description**: Use this extension to optimize and transform images via a powerful HTTP API with over 30 different image operations to enhance and manipulate your images.
6
6
7
-
**Details**: Use this extension to optimize and transform images via a powerful HTTP API with over 30 different image operations to enhance and manipulate your images.
8
7
9
-
This extension creates a Cloud Function named `process`, which can be called via a GET request, specifiying
10
-
the operations to perform via the `operations` query parameter, for example:
8
+
9
+
**Details**: Image Processing Extension
10
+
Use this extension to optimize and transform images via a powerful HTTP API with over 30 image operations for enhancing and manipulating your images.
11
+
12
+
How It Works
13
+
When you install this extension, it deploys a Cloud Function that exposes an HTTP API. All requests must be sent to the /process endpoint of the function. You perform image operations by passing an operations query parameter—a URL-encoded JSON string defining the operations to execute.
- Cloud Functions location: Where do you want to deploy the functions created for this extension? You usually want a location close to your Storage bucket. For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
79
+
* Cloud Functions location: Where do you want to deploy the functions created for this extension? You usually want a location close to your Storage bucket. For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
80
+
81
+
* Cloud Storage bucket for images: The Cloud Storage bucket where images that are to be processed are located. API requests with input urls or paths that are not inside this bucket will be dropped.
82
+
83
+
84
+
* Allowed CORS origins.: A comma delimited value of allowed CORS origins. Use the default of '*' to allow all origins. This is useful to lockdown your API and only allow your own website to embed the images directly. Note this will not prevent non-browser requests from accessing your API.
85
+
49
86
50
-
- Cloud Storage bucket for images: The Cloud Storage bucket where images that are to be processed are located. API requests with input urls or paths that are not inside this bucket will be dropped.
51
87
52
-
- Allowed CORS origins.: A comma delimited value of allowed CORS origins. Use the default of '\*' to allow all origins. This is useful to lockdown your API and only allow your own website to embed the images directly. Note this will not prevent non-browser requests from accessing your API.
53
88
54
89
**Cloud Functions:**
55
90
56
-
-**handler:** Serves a API accepting incoming HTTP requests.
91
+
***handler:** Serves a API accepting incoming HTTP requests.
92
+
93
+
57
94
58
95
**APIs Used**:
59
96
60
-
- storage-component.googleapis.com (Reason: Needed to use Cloud Storage)
97
+
* storage-component.googleapis.com (Reason: Needed to use Cloud Storage)
98
+
99
+
61
100
62
101
**Access Required**:
63
102
103
+
104
+
64
105
This extension will operate with the following project IAM roles:
65
106
66
-
- storage.admin (Reason: Allows the extension to read images in Cloud Storage)
107
+
* storage.admin (Reason: Allows the extension to read images in Cloud Storage)
0 commit comments