Photos to posts
WordPress plugin to import photos as posts
★ 0stars
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/csnipper/photos-to-posts/archive/refs/heads/master.zipPhotos to Posts automatyzuje tworzenie wpisów WordPress na podstawie przesłanych zdjęć. Plugin wyciąga metadane XMP (m.in. z Lightrooma) i mapuje je do pól ACF oraz — opcjonalnie — do taksonomii na stworzonej publikacji (CPT photo lub inny skonfigurowany typ). Jest to prosty, bezpieczny i konfigurowalny workflow do masowego importu fotografii.
Ważne: ta wersja pluginu zapisuje zmapowane wartości ACF bezpośrednio na poście (CPT), nie na załączniku (attachment).
Funkcje
- Parsowanie XMP z plików obrazów (wydzielone, pragmatyczne regexy dla najczęściej używanych pól).
- Mapowanie pól XMP → ACF (dla pól przypisanych do wybranego post_type, np.
photo). - Mapowanie pól XMP → CPT UI (dla pól przypisanych do wybranego post_type, np.
photo). - Mapowanie XMP → taksonomie posta (keyword → terms).
- Bulk uploader z Dropzone.js — tworzy posty i przypisuje miniatury.
- Panel ustawień: konfiguracja post_type, mapowania ACF, mapowania do taksonomii.
- Debugowanie: logi przy włączonym WP_DEBUG.
Instalacja (deweloperska / repo)
- Skopiuj folder
photos-to-postsdowp-content/plugins/. - Aktywuj plugin w panelu WordPress.
- Utwórz grupę pól ACF przypisaną do post type (np.
photo). Użyj unikalnychfield name— to one pojawiają się w ustawieniach mapowania. - W Ustawieniach pluginu wybierz
Post typei zmapuj wybrane pola ACF.
Szybkie testy
- Włącz WP_DEBUG i WP_DEBUG_LOG w
wp-config.php, by zobaczyć szczegółowe logi:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
- Prześlij zdjęcie przez ekran Upload pluginu i sprawdź, czy powstał post typu
photoz wypełnionymi polami ACF.
# Photos to Posts
Photos to Posts automates creating WordPress posts from uploaded photos. The plugin extracts XMP metadata (for example from Lightroom) and maps it to ACF fields and — optionally — to taxonomies on the created post (CPT `photo` or a different configured post type). It provides a simple, safe, and configurable workflow for bulk photo import.
Important: this version writes mapped ACF values to the post (CPT) itself, not to the attachment.
## Features
- Parses XMP embedded in image files (practical regexes for commonly used fields).
- Maps XMP fields → ACF fields (ACF fields assigned to the selected post_type, e.g. `photo`).
- Maps XMP fields → CPT UI fields.
- Maps XMP keywords → post taxonomies (terms).
- Bulk uploader using Dropzone.js — creates posts and sets featured images.
- Settings panel: configure post_type, ACF mapping and taxonomy mapping.
- Debugging: logs when WP_DEBUG is enabled.
## Installation (developer / repo)
1. Copy the `photos-to-posts` folder into `wp-content/plugins/`.
2. Activate the plugin in the WordPress admin.
3. Create an ACF field group assigned to the target post type (e.g. `photo`). Use unique field names — these appear in the plugin mapping settings.
4. In the plugin Settings, choose the Post type and map the desired ACF fields.
## Quick tests
- Enable WP_DEBUG and WP_DEBUG_LOG in `wp-config.php` to see detailed logs:
```php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
```
- Upload a photo through the plugin Upload screen and check that a `photo` post was created with the mapped ACF fields populated.
## Roadmap
- UI for manual preview and manual mapping trigger for a specific attachment ID.
- Support for more advanced ACF structures (repeater, group) and improved handling of field types.
- More control over write conflicts (append/replace for taxonomy terms).
## License
GPL-2.0-or-later — see `LICENSE`.