Updated on 2025-07-10 GMT+08:00

Introduction

The best practice for FunctionGraph guides you through image watermarking based on a function. (OBS Application Service trigger is available only in CN North-Beijing4, CN North-Ulanqab1, and CN East-Shanghai1.)

Scenarios

  • Upload images to a specified OBS bucket.
  • Watermark each uploaded image.
  • Upload the processed images to another specified OBS bucket.
    1. This tutorial uses two different OBS buckets.
    2. The function you create must be in the same region (default region) as the OBS buckets.

Procedure

  • Create two buckets on the OBS console.
  • Create a function and set the OBS Application Service trigger.
  • Upload an image to one of the buckets.
  • The function is triggered to watermark the image.
  • The function uploads the processed image to the other bucket.

    After you complete the operations in this tutorial, your account will have the following resources:

    1. Two OBS buckets (respectively used for storing uploaded and processed images)
    2. An image watermarking function
    3. An OBS Application Service trigger, which is used to associate a function with an OBS bucket.