Files
cresta31/IMAGE_SETUP.md
T
Mark Gregory 1e06af2105
tests / ci (push) Canceled after 0s
Initial Commit
2026-10-15 16:51:54 +01:00

1.3 KiB

Cresta 31 automatic image optimisation

The original 11 PNG photos remain in the repository, but the public-facing homepage uses optimised WebP versions in public/images/lodge/{hero,gallery,thumb}. The hero is 1920px maximum, gallery images 1200px, and thumbnails 480px.

New uploads

  1. Install GD with WebP support on the production host: sudo apt install php8.5-gd && sudo systemctl restart php8.5-fpm.
  2. Deploy these changes, then run cd /var/www/cresta31/current && php artisan migrate --force.
  3. Verify php artisan storage:link and that public/storage resolves to shared/storage/app/public through Deployer's shared storage symlink.
  4. Sign in using the account matching LODGE_ADMIN_EMAIL in .env; open /admin/bookings and upload images under Lodge photographs.
  5. New uploads automatically generate 1600px gallery and 480px thumbnail WebP images in the shared storage/app/public/lodge directory, and appear on the public homepage. They persist across Deployer releases.

Requirements: PHP GD WebP support, writable shared storage, and configured database. The 15 MB per-file and 10-files-per-request limits are application limits; upload_max_filesize and post_max_size in PHP-FPM must be high enough (e.g. 16M and 160M) for maximum-size batches. The initial 11 static photographs are not managed by the upload UI.