@@ -148,6 +148,7 @@ There are some additional configuration options you can change, for example the
| `showGalleryTitle` | `bool` | Show a title on the gallery page. |
| `allowDownloadAll` | `int` | Allow visitors to download all files as a zip. `0` disable downloads `1` follow Immich setting per share ([example](https://github.com/user-attachments/assets/79ea8c08-71ce-42ab-b025-10aec384938a)) `2` always allowed |
| `showHomePage` | `bool` | Set to `false` to remove the IPP shield page at `/` and at `/share` |
+| `showMetadata` | `object` | See the [Metadata](#metadata) section below. |
| `customInvalidResponse` | various | Send a custom response instead of the default 404 - see [Custom responses](docs/custom-responses.md) for more details. |
For example, to disable the home page at `/` and at `/share` you need to change `showHomePage` to `false`:
@@ -159,10 +160,14 @@ For example, to disable the home page at `/` and at `/share` you need to change
...
}
}
-
-
```
+#### Metadata
+
+| Option | Type | Description |
+|---------------|--------|----------------------------------------------------|
+| `description` | `bool` | Show the description as a caption below the photo. |
+
### lightGallery
The gallery is created using [lightGallery](https://github.com/sachinchoolur/lightGallery).
diff --git a/app/config.json b/app/config.json
index a77788b..a3413cb 100644
--- a/app/config.json
+++ b/app/config.json
@@ -7,9 +7,12 @@
"singleImageGallery": false,
"singleItemAutoOpen": true,
"downloadOriginalPhoto": true,
- "showGalleryTitle": false,
"allowDownloadAll": 0,
"showHomePage": true,
+ "showGalleryTitle": false,
+ "showMetadata": {
+ "description": false
+ },
"customInvalidResponse": false
},
"lightGallery": {
diff --git a/app/package-lock.json b/app/package-lock.json
index e6be723..d630d8f 100644
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "immich-public-proxy",
- "version": "1.9.1",
+ "version": "1.11.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "immich-public-proxy",
- "version": "1.9.1",
+ "version": "1.11.0",
"license": "AGPL-3.0",
"dependencies": {
"archiver": "^7.0.1",
diff --git a/app/package.json b/app/package.json
index 9577e7b..467b3ee 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,6 +1,6 @@
{
"name": "immich-public-proxy",
- "version": "1.10.0",
+ "version": "1.11.0",
"scripts": {
"dev": "ts-node src/index.ts",
"build": "npx tsc",
diff --git a/app/src/render.ts b/app/src/render.ts
index 0e24755..07c3bea 100644
--- a/app/src/render.ts
+++ b/app/src/render.ts
@@ -122,7 +122,7 @@ class Render {
downloadUrl,
thumbnailUrl: baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail),
video,
- description: asset?.exifInfo?.description ?? ''
+ description: getConfigOption('ipp.showMetadata.description', false) && typeof asset?.exifInfo?.description === 'string' ? asset.exifInfo.description : ''
})
}
res.render('gallery', {
diff --git a/app/views/gallery.ejs b/app/views/gallery.ejs
index 4511e91..087b96d 100644
--- a/app/views/gallery.ejs
+++ b/app/views/gallery.ejs
@@ -7,7 +7,7 @@
// Add an og-image using the first image's thumbnail
if (items?.[0]?.thumbnailUrl) {
%>
-
+
<% } %>
@@ -21,22 +21,24 @@
<%
if (showDownload) {
%>
-
-
-
+
+
+
<% } %>
<%
// Load the first 50 thumbnails, then load more as the user scrolls. See web.js
items.slice(0, 50).forEach(item => {
+ // Replace HTML entities for description text (if any)
+ item.description = item.description.replace(/'/g, ''')
if (item.video) { %>
data-sub-html='