[Enhancement] More configurable photo overlay text
When showing a closeup of a picture, lychee shows two lines of "overlay" text:

Currently, the first line is always the photo title, while the second line is configurable using the image_overlay_type configuration value. I would like to see this overlay a little more configurable, since the photo title is often not really meaningful (by default it is just the filename), while other things like the description or artist field can be more informative (in my case, I would like to show the artist on the first line, and the photo date on the second line).
To facilitate this, here are some related suggestions to make this configurable:
- Add something like
image_overlay_first_lineto allow configuring the first line of the overlay as well. For consistency, it would probably be good to rename/migrate the existingimage_overlay_typetoimage_overlay_second_lineor so. - Allow showing the EXIF artist field in addition to the current options.
- Make the configuration value a template of some kind using variable substitutions (where the currently available types are made into available variables). E.g. allow setting
image_overlay_first_line = "Taken by $artist"to allow maximum control in the advanced settings. For the regular settings, the existing dropdown can just set templates in the bacground (i.e. when selecting "Description", that setsimage_overlay_first_line = "$description", or for "Artist" that setsimage_overlay_first_line = "Taken by $artist"). This might require adding a few more variables (I can imagine$camera_iconto generate the span/svg tag for the camera icon). This can also expose different individiual values ($shutter,$focal, etc. and maybe different data/time variants), though you would probably still need something like$camera_settingswith all these values combined, but smartly leaving out anything that is missing (i.e. if you would just doimage_overlay_first_line = "$shutter at $aperture, ISO $iso<br/>$focal" you would get empty bits if there is e.g. no aperture value set or so. Note that using$`-syntax here is just a placeholder, I can imagine that Laravel already has some other syntax that is trivial to use and might be preferred. - Maybe make this into a list of templates, so you could do e.g.
image_overlay_first_line = "$description | $title"to fall back to the title if no description is set (currently such fallbacks are hardcoded). - Maybe rename the "Exif" selection in the dropdown to "Camera settings" since EXIF contains a lot more data than just the focal length etc.
And then maybe the same approach could be used for the overlay you get in an album view (the current option is about the single photo closeup view, but when viewing an album each picture also shows a hardcoded title + date overlay currently).
Thank you for your detailed and well-thought-through explanation, and sorry that we took so long to get back to you!
What you propose goes well beyond the level of configurability that we currently have in the front end, so unfortunately that's not something that would be trivial to add. I like the proposal though!
The artist field would be particularly problematic because right now we don't extract this info from image files. So we would need to extend the database to be able to store it, and it would only be available for newly added images.
These are not insurmountable problems of course, but I don't have the time to work on it in the foreseeable future, and I'm going to guess that neither do the other regular developers. We do welcome external contributions though!