Add optional images to slides
Slides (except YouTube) can carry one image. Uploads are validated, rotated by EXIF orientation, scaled to 1600 px and stored as WebP outside webroot, which also strips camera metadata. Images have an alt text (or are marked decorative) and a layout: top, side or full screen (content slides). Files are removed after the commit when a slide is deleted or its image is replaced, with the poll, and `bin/cake images_cleanup` sweeps leftovers. Duplicated slides get their own file. Docker image gains gd with WebP. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c7818ee40
commit
a395b50894
30 files changed
+1705
-11
No files matched your search
@@ -50,6 +50,18 @@ return [
|
||||
'votesPerMinute' => (int)env('THROTTLE_VOTES_PER_MINUTE', 600),
|
||||
],
|
||||
'pollIntervalMs' => (int)env('POLL_INTERVAL_MS', 2000),
|
||||
// Slide images (see \App\Service\ImageService): scaled and re-encoded as WebP, stored outside webroot.
|
||||
'images' => [
|
||||
// One sub directory per poll. In containers keep it on the volume, e.g. /data/uploads.
|
||||
'path' => (string)env('UPLOADS_PATH', ROOT . DS . 'data' . DS . 'uploads'),
|
||||
// Largest accepted upload (the original, before scaling). PHP's upload_max_filesize/post_max_size must allow it.
|
||||
'maxUploadBytes' => (int)env('IMAGE_MAX_UPLOAD_MB', 10) * 1024 * 1024,
|
||||
// Longest edge after scaling, in pixels.
|
||||
'maxEdge' => 1600,
|
||||
'quality' => 82,
|
||||
// Slides with an image per poll.
|
||||
'maxPerPoll' => (int)env('IMAGE_MAX_PER_POLL', 20),
|
||||
],
|
||||
// Slides embedded in other presentation software (/e/{key}/{slide}, e.g. Canva).
|
||||
'embed' => [
|
||||
// A visible embedded slide reports every N seconds that it is still on screen ...
|
||||
|
||||
Reference in new issue
Block a user