Back to Templates
Marketing
Avatar Processing
Generate consistent avatar sizes with circular crop and optimization
Claude Code Ready
Multi-step Pipeline
How It Works
5 steps in this workflow
- 1 Input image
- 2 Crop image
- 3 Resize to 256×256
- 4 Resize to 128×128
- 5 Resize to 64×64
Code Examples
Use this template programmatically with the FloImg SDK or CLI
const avatars = await floimg.pipeline(photo, [
{ op: 'crop', params: { shape: 'circle' } },
{ op: 'resize', params: { width: 256 }, save: 'avatar-256.png' },
{ op: 'resize', params: { width: 128 }, save: 'avatar-128.png' },
{ op: 'resize', params: { width: 64 }, save: 'avatar-64.png' },
]); # Avatar Processing
name: "Avatar Processing"
steps:
- kind: transform
op: crop
params:
shape: "circle"
out: avatar-256.png
- kind: transform
op: resize
params:
width: 128
out: avatar-128.png
- kind: transform
op: resize
params:
width: 64
out: avatar-64.png # Avatar Processing
# Run pipelines via YAML config:
floimg run workflow.yaml