sandywp / plugins / gallery-for-immich

Gallery for Immich

5.0 out of 5 stars. 5.0 2 reviews

Display your Immich photo albums and galleries in WordPress using simple shortcodes.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v0.10.0 100+ installs WP 5.8+ PHP 7.4+

your-sandbox.sandywp.com/wp-admin
Gallery for Immich running inside a SandyWP sandbox

What you get inside

6 screens
  • An overview of selected albums, with album names. Clicking an album opens it on the same page.

  • An album with photo descriptions and dates, limited to six photos.

  • A photo opened in the lightbox. Browse with the arrows, swipe or the keyboard; videos and Live Photos play here too.

  • A single photo aligned left, with the text flowing around it.

  • The Gallery for Immich block in the block editor, with the album, sort order, number of photos and link behavior in the sidebar.

  • The settings page: Immich server, video playback, cache, and the connection & permissions test.

About this plugin

Gallery for Immich is a WordPress plugin that seamlessly integrates your self-hosted Immich photo server with your WordPress site. Display beautiful photo galleries and albums using simple shortcodes.

Key Features:

  • Gutenberg Block Editor – Visual block for selecting albums, photos and settings
  • Shortcode Support – Classic [gallery_for_immich] shortcode for any editor
  • Display list of albums from Immich
  • Display entire albums from Immich
  • Beautiful responsive grid layouts
  • Integrated lightbox with GLightbox
  • Video playback modes (shared links, stream through WordPress, or ignore videos)
  • Photos and videos on password-protected and private pages are only shown to visitors who may see the page
  • Caching of album lists, album contents and photo details, with a button to clear the cache
  • Flexible sorting options (date/name, ascending/descending)
  • Limit the number of albums or photos shown, either the first ones or a random selection
  • Single photo embedding – Display one photo with alignment (left/right/center) and configurable link behavior (lightbox, no link, or custom URL)
  • Full internationalization support (Dutch, German, French translations)
  • Configure Immich server URL and API key in the WordPress admin panel

Perfect for:

  • Photography portfolios
  • Family photo sharing
  • Event galleries
  • Travel blogs
  • Any self-hosted photo management with Immich

Usage

Using the Gutenberg Block Editor:

The easiest way to add an Immich gallery is through the Gutenberg block editor:

  1. Add a new block and search for “Gallery for Immich”
  2. Select your display mode (all albums, single album, multiple albums, or single photo)
  3. Configure display options using the sidebar controls
  4. Customize thumbnail size and text sizes as needed
  5. The preview shows the shortcode that will be used

Using Shortcodes:

You can also use shortcodes directly in your content:

Display all albums:
[gallery_for_immich]

Display specific albums (comma-separated IDs):
[gallery_for_immich albums=”album-id-1,album-id-2″]

Display single album:
[gallery_for_immich album=”album-id”]

Display single photo:
[gallery_for_immich asset=”photo-id”]

Customize display options:
[gallery_for_immich show=”gallery_name,asset_description”]

Available show options (no defaults – must be explicitly specified):
* gallery_name – Show album/gallery name
* gallery_description – Show album description
* asset_date – Show photo date
* asset_description – Show photo description

Note: If the show parameter is not specified, only thumbnails are displayed without any text.

Different texts on the album page:
[gallery_for_immich show=”gallery_name” detail_show=”gallery_name,gallery_description,asset_date”]

When a visitor clicks an album in an overview, the album opens with the same show options. detail_show sets different options for that album page, using the same values as show. detail_show="" shows no text there; without detail_show, show applies to both.

Customize sizes:
[gallery_for_immich size=”300″ title_size=”18″ description_size=”15″ date_size=”12″]

Size options:
* size – Thumbnail size for albums (100-500, default: 200); max-width for single photos (100-1200, default: 200)
* title_size – Title font size (10-30, default: 16)
* description_size – Description font size (10-30, default: 14)
* date_size – Date font size (10-30, default: 13)

Single photo alignment and link behavior:
[gallery_for_immich asset=”photo-id” align=”left” link=”none”]
[gallery_for_immich asset=”photo-id” align=”right” link=”https://example.com”]

Align options: left, right, center (default: no float)
Link options: lightbox (default — opens in overlay), none (no link), or any https://... URL
Link target (custom URL only): new (default — opens in a new tab) or same (opens in the current tab)
[gallery_for_immich asset=”photo-id” link=”https://example.com/page” link_target=”same”]

Sort order:
[gallery_for_immich order=”date_desc”]
[gallery_for_immich album=”album-id” order=”description_asc”]

Available order options:
* date_desc – Newest first (default for albums)
* date_asc – Oldest first (default for photos – chronological order)
* name_asc – Alphabetically A-Z (albums only)
* name_desc – Alphabetically Z-A (albums only)
* description_asc – Alphabetically A-Z by description (photos only)
* description_desc – Alphabetically Z-A by description (photos only)

Note: Name sorting is only available for albums. Photos can be sorted by date or description.

Limit the number of albums or photos:
[gallery_for_immich album=”album-id” limit=”10″ order=”date_desc”]
[gallery_for_immich limit=”3″ pick=”random”]

  • limit – Maximum number of albums (overview) or photos (album), 1-1000. Omit to show all.
  • pick – first (default) takes the first ones in the sort order; random shows a random selection, still displayed in the sort order

For albums sorted by date, or with pick="random", only the requested photos are fetched from Immich. An album opened from a limited overview still shows all of its photos.

Show the latest photo of an album, linking to your gallery page:
[gallery_for_immich album=”album-id” limit=”1″ order=”date_desc” link=”https://example.com/gallery” link_target=”same”]

link and `link_target` work for albums with the same values as for single photos. A custom URL applies to every photo in the album; album overviews are not affected.<h3>Privacy & Security</h3>

This plugin:
* Connects to your self-hosted Immich server via API
* Does not collect or transmit any user data to third parties
* Warns when the connection to Immich is not encrypted (HTTP instead of HTTPS)
* Validates all user input and API parameters
* Uses WordPress security best practices

Your Immich server credentials (URL and API key) are stored in your WordPress database. Cached album and photo details from Immich (names, descriptions, dates, IDs) are stored there too, as transients that expire after the configured cache time. No location or camera data is cached.

Support

For issues, feature requests, or contributions, please visit:
https://github.com/vogon1/immich-wordpress-plugin

Credits

  • Lightbox powered by GLightbox (https://github.com/biati-digital/glightbox)
  • Integrates with Immich (https://immich.app)

Questions

What is Immich?

Immich is a self-hosted photo and video backup solution. Learn more at https://immich.app

Do I need my own Immich server?

Yes, this plugin requires a running Immich server with API access.

How do I find my album or photo IDs?

You can find IDs in your Immich server’s URL when viewing albums or photos, or through the Immich API.

Does this work with localhost or an HTTP address?

Yes. The server URL may start with http:// or https://. For an http:// address other than localhost, the settings page asks you to confirm, because the API key and photos then travel unencrypted between WordPress and Immich. That is fine on a private network, for example when WordPress reaches Immich at its internal address; across the internet, use HTTPS.

Can I use a separate Immich account instead of the owner account?

Yes. You can create a secondary Immich account, share the albums you want to publish with it, and use that account’s API key. This keeps your main account’s credentials off the WordPress server.

One limitation: Immich only allows shared links to be created for assets a user actually owns, not for assets that are merely shared with them. Photos work normally, but videos in the default ‘Shared links’ video mode will not play for such a display account. Choose ‘Stream through WordPress’ or ‘Ignore videos’ instead. The connection & permissions test on the settings page detects this situation and explains it.

I added photos to an album in Immich. Why don’t they show up?

The plugin caches the album list, album contents and photo details for a while, 15 minutes by default. The change shows up after that time. To show it right away, click Clear cache under Settings > Gallery for Immich. You can also change the cache time there, or turn caching off.

Are photos on a password-protected page protected?

Yes. Image and video URLs are signed for the page they are shown on, and the plugin only serves them to visitors who entered that page’s password. On a private page or a draft, only logged-in users who may read it see them. Note that this protects the page, not the album: if the same album is also shown on a public page, it can be seen there.

The gallery shows “No photos found”, but the album has photos.

Log in as an administrator and look at the page again: below the message you then see the error Immich returned, for example a missing permission or an error from a proxy in front of Immich. The Test connection & permissions button on the settings page shows the same details per permission.

5.0

2 reviews

  • 5 ★ 2
  • 4 ★ 0
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 0

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.