One picture a day in your web browser.
Demo available at https://photos-demo.dubandubois.com/
This application is now considered as stable. No more features are planned, but feel free to suggest some if you need. Feature, fix, UX, logo, translation... any help is welcome !
....for end users
- large daily photo page with navigation per day.
- full page monthly photo grid with navigation per month.
- full page yearly photo grid (one random photo per month) with navigation per year.
- on the daily view, show photos taken every year at the same date.
- slideshow page with random photos.
- keyboard arrows and touch screen swipe navigation.
- responsive design.
- a web server (tested with Apache).
- PHP >= 7.1.3.
- GD Library >=2.0 or Imagick PHP extension >=6.5.7.
- Download the code to an empty folder:
git clone email@example.com:simondubois/photos.git /var/www/photos
- Create the configuration file:
cd /var/www/photos && cp .env.example .env
- Install the dependencies:
composer install --optimize-autoloader --no-dev
- Point the web server to
How to upload photos?
This feature is not implemented, and there is no plan to implement it in the future. This is a KISS project focusing on displaying photos, not managing files.
To upload photos, you have several options:
- (S)FTP or any file manager provided by your hosting.
- sync a server folder with a local folder.
- sync a server folder with a file hosting service.
- sync a server folder with a personal cloud service.
- fork the project and implement the feature.
Why are some photos so slow?
The core idea of this app is to render photos without altering the original files. Thus all photos are optimised at request time. One option would be to cache the operations on files. Unfortunatelly,
intervention/imagecachehas known issue about slow cache. Another option would be to store a copy of the optimized image and serve this file instead. But cache invalidation is impossible because we do not manage the original files.
To improve perfomances, two trade-offs have been implemented:
- The APi asks the client to cache the photo for one week. So the client cache the files.
- The client request all photos to have the same maximum resolution. So each photo is requested once, no matter how large is the container.
What about authentication?
Authentication either requires a database or an external service. Also, authentication require additional features like lost passwords and account activation. This is a KISS project focusing on displaying photos, avoiding any complexity.
If you want authentication, I recommend you to setup Basic access authentication at the server level.
How to change the theme?
You can easily switch to any other Bootswatch theme:
npm installto install all frontend dependencies.
- Replace the two occurences to
sketchywith the template namce of your choice.
npm run devto compile the assets with the new theme. Voilà!