=== Aperture ===
Contributors: arokai
Tags: photography, gallery, upload, licensing, photographers
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 0.6.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send photos from your phone or computer straight to your site, sorted into collections and albums, ready to license.

== Description ==

Aperture turns a WordPress site into a photographer's home base.

* **Send photos safely.** Media > Send photos takes whole folders from any computer or phone. Every file travels in small pieces that survive bad connections, and is only kept when its SHA-256 fingerprint matches the original.
* **Sorted on arrival.** Albums by capture day; tags for camera, orientation and tone; collections by subject from the Aperture apps or an optional tagging service.
* **Show and license.** Put `[aperture_gallery]` on a page: collections, albums, filters, and a license picker on every photograph.
* **Get paid.** Connect your Stripe account in a few clicks and buyers pay by card, then download the full-resolution original and a license certificate straight away. Or keep taking requests by email.
* **Works on your host.** Tools > Site Health reports what Aperture can do on this server and how to unlock more.
* **One API for every app.** The desktop, iPhone and Android apps use the same upload API (see API.md).

Photographs stay ordinary Media Library items. Uninstalling Aperture keeps them, with their collections, albums and tags.

== Installation ==

1. Upload the `aperture` folder to `/wp-content/plugins/`, or upload the zip in Plugins > Add New.
2. Activate Aperture.
3. Check Tools > Site Health for anything Aperture recommends.
4. Send photos from Media > Send photos.
5. Add `[aperture_gallery]` to a page and set prices in Settings > Aperture.
6. To sell by card, choose Card under Settings > Aperture, Getting paid, and click Connect with Stripe.

== Frequently Asked Questions ==

= Is there a phone app? =
Yes: open yoursite/upload on your phone (Media, Send photos shows the exact address) and add it to your home screen. It sends photos the same way as the uploader in wp-admin. On Android you can also share photos to it straight from your gallery. On iPhone, tap Share in Safari, then Add to Home Screen. Tick "Remember me" when you sign in so the app stays signed in.

= Can photos come from Dropbox, Google Drive or my NAS? =
Yes. Under Media, Cloud folders, connect Dropbox or Google Drive (you sign in with them and choose a folder), or enter a WebDAV address for a Synology, QNAP, Nextcloud or ownCloud folder. Aperture checks each folder every 15 minutes and imports new photos; it never changes or deletes anything there. OneDrive is planned. iCloud and Mega have no way for a website to read them, so they will come through the desktop and iPhone apps.

= Where does subject tagging happen? =
On the device that sends the photos (the Aperture apps), or on a tagging service you connect with `APERTURE_TAGGER_URL`. Photos sent from a browser arrive with date, camera, orientation and tone.

= Is location shown publicly? =
The gallery never prints it, and it only serves WordPress's resized copies, which carry no EXIF. The original file keeps its EXIF (GPS included) because it is the photographer's master; photos smaller than 2048 px wide are shown as uploaded.

= Can buyers pay by card? =
Yes. Under Settings > Aperture, choose Card and click Connect with Stripe. You sign in to Stripe (or create an account) and come back; buyers then pay on Stripe's checkout page and the money goes to your own Stripe account. Every sale appears under Media > Licenses sold. Exclusive licenses, and any tier priced at 0, stay "by quote" by email.

= What does Aperture charge? =
The plugin is free. On card sales, Aperture keeps 1% of the sale to fund its development; Stripe takes it automatically at payment, and the settings page shows it before you connect. Stripe's own processing fees are separate and go to Stripe. Email requests cost nothing.

= What does a buyer receive? =
A private link to the full-resolution original and a printable license certificate, by email and on the order page. JPEG, PNG and WebP originals are delivered with location data removed and your license metadata (creator, copyright, credit, terms, where to license) written in; JPEGs keep rotation, camera data and colour profile. HEIC, TIFF and RAW originals are delivered exactly as shot, with the license metadata as a separate .xmp file named after the photo (Lightroom, Capture One and Bridge read it when it sits beside the photo); sell JPEG exports if location matters. Refunding the payment in Stripe switches the links off within a day.

= What license metadata is written into photos? =
Set it once under Settings, Aperture, License metadata: creator, copyright notice, credit line, usage terms and contact details. It is written as standard IPTC fields (XMP) into every JPEG, PNG and WebP as it arrives, into the copies the gallery shows and into buyers' downloads, with each photo's own license page as the place to license it, so Google Images can show it as "Licensable". Change it for one photo in the Media Library. Only the metadata changes; the image is untouched. Other metadata already in an original (keywords, ratings, Lightroom edits) is kept. HEIC, TIFF and RAW files are not changed; buyers get a .xmp file alongside instead.

= Are the license terms legal advice? =
No. The certificate prints short placeholder terms; have them reviewed for your jurisdiction. Developers can replace them with the `aperture_license_terms` filter.

== Changelog ==

= 0.6.0 =
* License metadata (Settings, Aperture, License metadata): creator, copyright notice, credit line, usage terms and contact details, written into every JPEG, PNG and WebP on arrival from the site, the phone app and cloud folders, into gallery copies and into buyers' downloads. Each photo points to its own license page, so Google Images can mark it "Licensable". Per-photo changes in the Media Library; one button writes it into photos already on the site.
* HEIC, TIFF and RAW originals are never rewritten; buyers get the license metadata as a .xmp sidecar named after the photo.
* PNG and WebP downloads now have location removed (EXIF and XMP), as JPEGs already did.
* Photo pages carry the same facts as schema.org ImageObject data.

= 0.5.1 =
* Albums when sending: name an album (or pick an existing one) and the whole batch lands in it, instead of being split by capture day. A chosen folder becomes an album under its own name. Photos already on the site still join the album they are sent to.

= 0.5.0 =
* Cloud folders (Media, Cloud folders): connect a Dropbox or Google Drive folder, or a NAS or Nextcloud folder over WebDAV. New photos are imported every 15 minutes through the same checks as uploads; subfolders can become albums and a folder can feed a collection. Import only: nothing in the folder is changed.

= 0.4.1 =
* Library feed: a private, full-resolution index of everything in your Aperture collections and albums, for your own tools (for example a nightly mirror to a private GitHub repository). Signs in with an Application Password; originals come with location removed.

= 0.4.0 =
* Phone and desktop app: yoursite/upload installs to the home screen (PWA). Android can share photos to it from the gallery; the screen stays on while photos send.
* If Stripe stops recognising a site's account (for example when Aperture moves from test mode to live), the site drops the dead connection, buyers see the email request instead of an error, and the settings page asks you to connect again.

= 0.3.4 =
* Until Stripe is ready, the settings page asks Stripe on every visit and lists exactly what it is still waiting for.

= 0.3.3 =
* Connect with Stripe asks which country the business is based in (Stripe requires it and cannot change it later); the site language suggests one.

= 0.3.2 =
* Updates now come from arok.ai. WordPress no longer mistakes Aperture for an unrelated WordPress.org plugin with the same name and offers it as an "update".

= 0.3.1 =
* If connecting to Stripe fails, the settings page now says why (behind Cloudflare the reason was hidden by a "Bad gateway" page).

= 0.3.0 =
* Card checkout through Connect with Stripe: no keys to paste, no webhooks to set up. Aperture keeps 1% of card sales.
* Paid checkouts are confirmed even if the buyer closes the tab; refunds in Stripe revoke the license automatically.
* Older payment settings are cleaned up on upgrade.

= 0.2.0 =
* Card checkout through Stripe (hosted Checkout).
* Licenses sold: a record per sale, private download and certificate links, revoked automatically on refund.
* Originals delivered with location removed (JPEG, lossless).
* Currency setting; price 0 makes a tier "by quote".
* Site Health check for payments.

= 0.1.0 =
* First release: resumable, verified uploads; collections, albums and tags; Site Health checks; gallery shortcode with license requests; web uploader.

== Credits ==

Icons: Lucide (ISC), via Iconify. Fonts: Spectral and Hanken Grotesk (SIL Open Font License), self-hosted. EXIF reading in the browser: exifr (MIT).
