Photo_library_rest_api
This WordPress plugin provides REST access points to retrieve JSON data about photos and their metadata stored in the database.
by alex baron · github.com/alexbaron/photo_library_wp_api_rest_plugin · website
★ 1stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/alexbaron/photo_library_wp_api_rest_plugin/archive/refs/heads/main.zipPhotoLibrary 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
- Upload the plugin to
/wp-content/plugins/photo_library_wp_api_rest_plugin/ - Activate the plugin through the WordPress admin
- 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 checkGET /pictures/all- Get all picturesGET /pictures/{id}- Get picture by IDGET /pictures/random/{count}- Get random picturesPOST /pictures/by_keywords- Search by keywordsGET /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