Uploads: frame a photo before it goes (crop, zoom, position)
A photo field with a shape (crop: square for people, 16:9 for event photos, covers and hero photos, the photo's own for block images and schedule graphics) opens Frame the photo when a JPEG, PNG or WebP is uploaded: drag or arrow keys to place it, a zoom slider, and a shape menu. The framed part is drawn on a canvas and uploaded in place of the original; Upload as is skips it. Logos, SVGs and GIFs go as they are. No new dependency and nothing stored beside the picture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
034ad95b8a
commit
07be48d770
9 changed files with 298 additions and 10 deletions
|
|
@ -15,6 +15,14 @@ in the `media` table (`server/src/migrations/028_media.sql`).
|
|||
- **Keep original** stores the file exactly as uploaded (up to 10 MB),
|
||||
metadata and all.
|
||||
- SVGs are always kept as they are.
|
||||
- A photo field with a shape (people, event photos and card
|
||||
backgrounds, blog covers, hero photos, link card pictures, block
|
||||
images and schedule graphics; not logos) opens **Frame the photo**
|
||||
before uploading a JPEG, PNG or WebP: drag and zoom it inside the
|
||||
field's shape, or pick another (As uploaded keeps the photo's own).
|
||||
The framed part is what's uploaded; nothing about the framing is
|
||||
saved, so framing again means uploading again. Upload as is skips
|
||||
it. A field's shape is its `crop` option (`src/components/admin/fields.tsx`).
|
||||
- Accepted types: JPEG, PNG, GIF, WebP, SVG, and WebVTT captions
|
||||
(`.vtt`, kept as they are, always in `captions/`). The type is read
|
||||
from the file's contents, not its name: a captions file has to start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue