Add optional images to slides
CI / Deploy / PHP 8.4 (push) Successful in 1m10s
CI / Deploy / PHP 8.5 (push) Successful in 1m16s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

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:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-14 23:17:37 +01:00
1 parent 8c7818ee40
commit a395b50894
30 files changed
+1705 -11

No files matched your search

+8 -3
View File
@@ -2,10 +2,14 @@
# Configuration only through environment variables (see config/.env.example).
FROM php:8.5-cli-alpine AS base
RUN apk add --no-cache icu-libs \
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS icu-dev \
&& docker-php-ext-install -j"$(nproc)" intl \
# gd with JPEG/WebP: slide images are scaled and stored as WebP
RUN apk add --no-cache icu-libs libjpeg-turbo libpng libwebp \
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS icu-dev libjpeg-turbo-dev libpng-dev libwebp-dev \
&& docker-php-ext-configure gd --with-jpeg --with-webp \
&& docker-php-ext-install -j"$(nproc)" intl gd \
&& apk del .build-deps
# Image uploads of up to 10 MB (IMAGE_MAX_UPLOAD_MB) must pass PHP's limits
RUN printf 'upload_max_filesize=10M\npost_max_size=12M\n' > /usr/local/etc/php/conf.d/plenario-uploads.ini
FROM base AS build
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
@@ -25,6 +29,7 @@ COPY docker/entrypoint.sh /usr/local/bin/plenario-entrypoint
ENV DEBUG=false \
SHOW_ADMIN_LINK_AFTER_CREATE=false \
DATABASE_URL=sqlite:////data/plenario.sqlite \
UPLOADS_PATH=/data/uploads \
PHP_CLI_SERVER_WORKERS=8
RUN chmod +x /usr/local/bin/plenario-entrypoint \