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
+8
-3
@@ -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 \
|
||||
|
||||
Reference in new issue
Block a user