Image field
Lets a person choose the picture that stands for them or their organisation, such as a face, a logo or a cover, place it in its frame, and see it upload and save.
Examples
Profile picture
Profile picture
Cover
Logo
Profile
Profile picture
Usage
Use it when
- A person sets the picture that stands for them, such as a profile picture on an account page.
- An organisation sets its logo, or a group its cover, where the picture must fit a fixed frame and is sent already cropped.
Use something else when
- Files of any kind, or several at once, such as a booking's documents. Use FileDrop instead.
- Photos attached to a message. Use Composer instead.
- Someone's picture shown with no way to change it. Use Avatar instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/image-field.json https://kaanarici.com/r/cobalt/image-crop.jsonimport { ImageField, imageFieldLabels, type ImageUpload } from "@/components/cobalt/ui/image-field"import { centred, clampPlacement, coverScale, frameRatio, reach, sourceRect } from "@/lib/cobalt/image-crop"



