To use this example, you’ll first need to add these build settings to your trigger.config.ts file:
trigger.config.ts
Copy
Ask AI
import { defineConfig } from "@trigger.dev/sdk/v3";export default defineConfig({ project: "<project ref>", // Your other config settings... build: { // This is required to use the Sharp library external: ["sharp"], },});
Any packages that install or build a native binary should be added to external, as native binaries
cannot be bundled.
To test this task in the dashboard, you can use the following payload:
Copy
Ask AI
{ "imageUrl": "<an-image-url.jpg>", // Replace with a URL to a JPEG image "watermarkUrl": "<an-image-url.png>" // Replace with a URL to a PNG watermark image}
To test this example task locally, be sure to install any packages from the build extensions you added to your trigger.config.ts file to your local machine. In this case, you need to install .