Drupal is a registered trademark of Dries Buytaert

PhotoPrism Integration provides a robust, Service-Oriented Architecture (SOA) foundation for
integrating PhotoPrism, the AI-powered photo
management solution, with Drupal.

This module is designed primarily for developers who need a reliable, injectable service layer to build custom
integrations. It encapsulates the complexity of the PhotoPrism API into a clean PHP service, allowing you to focus
on building your features.

Key Features

  • Service-Oriented Design: All API interactions are handled by the
    photoprism_integration.client service.
  • Comprehensive API Coverage: Includes over 40 methods covering:
    • Albums & Folders: Create, read, update, delete, and manage photos within albums.
    • Photos: Search, retrieve metadata, manage favorites, and handle file operations.
    • AI Features: Access data for People (Face Recognition), Places (Geo), and Labels
      (Tags).
    • Organization: Interacts with Moments, Calendar, and Folder structures.
  • Developer-Friendly: Built-in error handling, logging, and extensive documentation.
  • Connection Testing: AJAX-powered configuration form to verify server connectivity instantly.
  • Demo UI: Includes a basic album browser and gallery view to demonstrate the service
    capabilities.

Service-Oriented Architecture (SOA)

The core of this module is the PhotoPrismClient service. Instead of providing a rigid UI, we provide the
tools you need to build exactly what you want—whether that's a custom block, a media library integration, or a sync
mechanism.

Usage Example

Inject the service into your Controller, Form, or Block:

$photoprism = \Drupal::service('photoprism_integration.client');

// 1. Check Server Status
$status = $photoprism->getStatus();

// 2. Search for "Nature" photos
$photos = $photoprism->searchPhotos('nature', ['count' => 10]);

// 3. Create a new album
$new_album = $photoprism->createAlbum('Summer Trip', 'Best photos from 2026');
$album_uid = $new_album['UID'];

// 4. Add photos to the album
$photoprism->addPhotosToAlbum($album_uid, [$photo_uid_1, $photo_uid_2]);

Configuration

  1. Navigate to Configuration > Media > PhotoPrism Integration.
  2. Enter your PhotoPrism Server URL (e.g., http://photoprism.local:2342).
  3. Enter your Access Token or App Password.
  4. Click Test Connection to verify settings.

Requirements

  • Drupal 9.4, 10, or 11
  • A running instance of PhotoPrism

Usage with Docker

If running Drupal and PhotoPrism in Docker containers, ensure you use the internal Docker hostname (e.g.,
http://host.docker.internal:2342) for the server URL.

Activity

Total releases
2
First release
Jan 2026
Latest release
1 month ago
Release cadence
7 days
Stability
100% stable

Releases

Version Type Release date
1.0.1 Stable Jan 13, 2026
1.0.0 Stable Jan 6, 2026