Back to the gallery

Getting photos in

Nothing to install from an app store. On a phone this is a shortcut you build once and then use from the share sheet forever; on a computer it is one command. Pick where your photographs are.

You are not connected to a library on this device yet. Every step below needs a key, so start one first. It takes a second.

Build the shortcut once

Shortcuts is already on your phone. What you are building is a share sheet action, so afterwards the whole flow is: select photos in Photos, tap Share, tap json-camera. It works on any number of photos at a time.

  1. 1

    Open Shortcuts and make a new one

    Tap the plus in the top right. Tap the name at the top, choose Rename, and call it json-camera. Everything below is added to this one shortcut, in order.

  2. 2

    Let it receive photos from the share sheet

    Tap the information icon at the bottom of the editor, turn on Show in Share Sheet, then tap the accepted types and narrow them to Images. This is what puts it in the Share menu inside Photos.

  3. 3

    Loop over whatever was shared

    Search the action list for Repeat with Each and add it. It will pick up Shortcut Input by itself. Every action from here goes inside the loop, between Repeat with Each and End Repeat.

    Repeat with Each item in Shortcut Input

  4. 4

    Send one photo

    Add Get Contents of URL. Tap Show More to open the settings, then set it up exactly like this.

    Get Contents of URL

    URLhttps://json-camera.fly.dev/api/library/upload

    MethodPOST

    Request BodyForm

    Then add two form fields with Add new field:

    Field one, the photograph

    typeFile

    keyfile

    valueRepeat Item

    Field two, your library key

    typeText

    keykey

    valueyour-library-key

    To pick Repeat Item as the value, tap the value box and choose it from the variable bar above the keyboard rather than typing it.

  5. 5

    Tell yourself when it is done

    After End Repeat, add Show Notification so a long batch does not finish silently.

    Show Notification: Photos sent to json-camera

  6. 6

    Use it

    Open Photos, tap Select, choose your photographs, tap the share icon, scroll to json-camera. Then come back to the gallery and pull to refresh.

If a photo comes back rejected

The server reads HEIC, which is what your camera shoots, so this should not happen. If it does, add a Convert Image action just inside the loop, set it to JPEG, and turn Preserve Metadata on so the capture date and location survive the conversion. Then point the file field at the converted image instead of Repeat Item.

Put the gallery on your home screen

The gallery is a web app that installs without an app store. Once it is on the home screen it opens full screen, keeps you signed in, and loads its shell instantly.

iPhone and iPad

Open the gallery in Safari, tap the share icon, scroll down and tap Add to Home Screen. It has to be Safari; Chrome on iOS cannot install web apps.

Android

Open the gallery in Chrome and take the Install prompt, or open the menu and choose Add to Home screen.

What to expect

It is not instant, and it should not pretend to be
Encoding runs a neural network on one CPU core, which is a few seconds per photograph. Four hundred photos is closer to an afternoon than a coffee break. Start it and leave it; the shortcut keeps going in the background.
Your originals stay exactly where they are
Nothing here deletes anything from your phone. Treat this as a second copy until you have pulled a few photographs back out and satisfied yourself they came back the way you wanted.
Large photos are scaled down before encoding
The server caps the long edge, because a full 48 megapixel frame would hold the machine for a minute. If you want originals at full resolution, convert locally with the command line, which has no cap.
This is compression, not encryption
The files look unreadable but there is no secret in them. Your key is what keeps the library private, and the photographs sit on a small server in an ordinary folder. Do not put anything here you would be hurt by losing or by someone else reading.
Location travels with your photos unless you say otherwise
Capture date, camera and GPS coordinates are carried across on purpose, because they are what let a library be sorted at all. Add a form field gps set to false in your shortcut to keep the date and drop the place.