Skip to content

[Enhancement] More configurable photo overlay text #1504

@matthijskooijman

Description

@matthijskooijman

When showing a closeup of a picture, lychee shows two lines of "overlay" text:

image

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_line to allow configuring the first line of the overlay as well. For consistency, it would probably be good to rename/migrate the existing image_overlay_type to image_overlay_second_line or 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 sets image_overlay_first_line = "$description", or for "Artist" that sets image_overlay_first_line = "Taken by $artist"). This might require adding a few more variables (I can imagine $camera_icon to 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_settings with all these values combined, but smartly leaving out anything that is missing (i.e. if you would just do image_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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Project for volunteersThe team has no plans to work on it (e.g. lack of time) but an external contribution is accepted
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions