Skip to content

Commit a87d789

Browse files
committed
docs(image-processing-api): fix documentation
1 parent b52a93a commit a87d789

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

extensions/image-processing-api/PREINSTALL.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
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.
1+
Image Processing Extension
2+
Use this extension to optimize and transform images via a powerful HTTP API with over 30 image operations for enhancing and manipulating your images.
23

3-
This extension creates a Cloud Function named `process`, which can be called via a GET request, specifiying
4-
the operations to perform via the `operations` query parameter, for example:
4+
How It Works
5+
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.
6+
7+
Example
8+
Define your operations like so:
59

610
```js
711
const operations = [
@@ -21,6 +25,11 @@ const operations = [
2125

2226
const params = `?operations=${encodeURIComponent(JSON.stringify(operations))}`;
2327
```
28+
Then, make your GET request to your Cloud Function using the correct endpoint. For example:
29+
30+
```
31+
https://us-central1-<your-project-id>.cloudfunctions.net/<extension-instance-id>/process${params}
32+
```
2433

2534
The extension also comes with a JavaScript utility library for simplifying the creation of operations:
2635

extensions/image-processing-api/extension.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ resources:
3737
Serves a API accepting incoming HTTP requests.
3838
properties:
3939
location: ${param:LOCATION}
40-
runtime: nodejs14
40+
runtime: nodejs20
4141
availableMemoryMb: 1024
4242
httpsTrigger: {}
4343

0 commit comments

Comments
 (0)