Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Save a named transform with client.CreatePreset().
preset, err := client.CreatePreset(ctx, dreep.CreatePresetOptions{ Key: "thumbnail", Name: "Thumbnail", Transform: &dreep.Transform{ Width: 200, Height: 200, Fit: dreep.FitCover, Format: dreep.FormatWebP, }, })
func (c *Client) CreatePreset(ctx context.Context, o dreep.CreatePresetOptions) (*dreep.Preset, error)
CreatePresetOptions
Key
string
Transform.Preset
Name
Transform
*dreep.Transform
Format
type Preset struct { ID string Key string Name string Params map[string]any // the stored transform parameters CreatedAt time.Time }
client.URL(asset.ID, &dreep.Transform{Preset: "thumbnail"}) client.Upload(ctx, dreep.UploadOptions{ File: f, Filename: "hero.jpg", Transform: &dreep.Transform{Preset: "thumbnail"}, })
dreep.IsPaymentRequired(err)
dreep.IsInvalidRequest(err)