WP Manifestindependent plugin directory
manifest / media / photo_library_wp_api_rest_plugin

Photo_library_rest_api

This WordPress plugin provides REST access points to retrieve JSON data about photos and their metadata stored in the database.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/alexbaron/photo_library_wp_api_rest_plugin/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

PhotoLibrary REST API Plugin

A comprehensive WordPress REST API plugin for photo library management with WP/LR Sync integration.

Features

  • RESTful API for photo management
  • WP/LR Sync integration for Lightroom synchronization
  • Hierarchical keyword/tag management
  • Advanced search capabilities
  • CORS support for external applications

Installation

  1. Upload the plugin to /wp-content/plugins/photo_library_wp_api_rest_plugin/
  2. Activate the plugin through the WordPress admin
  3. Optionally install WP/LR Sync for enhanced features

Quick Start

Test the API

curl https://your-site.com/wp-json/photo-library/v1/test

Get all keywords

curl https://your-site.com/wp-json/photo-library/v1/pictures/keywords

Search by keywords

curl -X POST https://your-site.com/wp-json/photo-library/v1/pictures/by_keywords \
  -H "Content-Type: application/json" \
  -d '{"search": ["beach", "sunset"]}'

API Endpoints

  • GET /test - API health check
  • GET /pictures/all - Get all pictures
  • GET /pictures/{id} - Get picture by ID
  • GET /pictures/random/{count} - Get random pictures
  • POST /pictures/by_keywords - Search by keywords
  • GET /pictures/keywords - Get all keywords (flat)
  • GET /pictures/hierarchy - Get keyword hierarchy

Documentation

See DEVELOPER_GUIDE.md for complete documentation, examples, and integration guides.

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • WP/LR Sync Plugin (optional, for enhanced features)

License

GPL v2 or later

Author

Alex Baron