Appearance
Watermarks
A watermark layers a transparent PNG (your logo or handle) onto every uploaded image. Sosyabot applies watermarks at upload time so the processed file lands in the Library already branded — not at publish time.
Endpoints
System-wide watermark (admin only):
GET /api/v1/watermarks/system— fetch the current system watermark.PUT /api/v1/watermarks/system— upsert (admin permission required).
There is no per-user or per-channel watermark; the workspace has one shared system watermark today.
Watermark model
typescript
{
team_id: ObjectId | null, // null = system-wide
image_url: string, // PNG with transparency
position: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center",
opacity: number, // 0–100
size_pct: number, // 1–100, % of image width
enabled: boolean,
}Defaults: position: "bottom-right", opacity: 60, size_pct: 20.
When the watermark is applied
The applyWatermarkIfEnabled() service runs during media upload (backend/src/services/watermarks.service.ts):
- Check if the
watermarkmodule is enabled for the workspace. - Fetch the system watermark; bail if disabled.
- Resize the watermark to
size_pctof the source image's width. - Adjust opacity via alpha blending.
- Composite onto the source at
positionusing Sharp. - Return the processed buffer (or the original buffer if any step fails — fail-open by design).
Because watermarking is at upload time, the original (un-watermarked) bytes are not retained. Re-upload a clean copy if you need the unbranded version.