Doing this would require your photos to be publicly accessible to the internet without authentication. In it’s current state, Photostructure is not intended to be exposed directly to the internet. Some folks do it, however, using a reverse proxy with a login.
Keep in mind that if you DO somehow find a way to use Photostructure to serve publicly accessible photos, you should take care to scrub the metadata from those photos, as there’s a lot of information in those pictures that can help strangers on the internet find you.
Once @mrm has built out authentication, I’m sure it would be possible to build in a feature to publicly share particular images. However, I still think it’s not a great idea, because now your website will require Photostructure to be running in order to display properly. If you ever move away from Photostructure, you’ll need to update all of those photos on your blog.
Even if the only pictures you post in photostructure are images you intend to be available to the public (i.e. you have no privacy concerns), there are all kinds of functionality that you can’t disable and you don’t want to expose to the public, such as “shutdown server”, “settings”, “rebuild”, etc.
IF in spite of all of that, you still want to do this, (unofficially) it’s certainly possible today. Every picture in the library is assigned a unique asset id and the URL for that picture is therefore unique. It will look something like this: https://your.server.address:port/img/xxxx/actual (where xxxx is an asset id, and “actual” is for the original - there are URLs you can discover for various thumbnail sizes too). With some fancy firewall/reverse proxy rules that only allow a certain URL patterns you could conceivably make that secure enough.
Officially, you probably should open a feature request, and/or vote on the one that should allow for this (depending on how it’s implemented):
I really like this idea, given it was done securely!
I currently either use Tailscale or a authed reverse proxy to access our family library, but once auth is added, a share button could be added for a given asset which would link to a URL that contains the asset id, size to render to, and an access token.
I’ve changed this post to be a feature request and voted for it. Thanks for posting!
I just ran into my first use case scenario. Can’t wait until something like this is in place. I’m using a timeline tool (https://timeline.knightlab.com/) to create a family timeline with media. It uses a google spreadsheet to populate the data for each item in the timeline, and one of the columns is reserved for media.
Right now, I’m having to go into Lightroom to find the image I want, then I upload it to Wordpress, then I use the URL in the WP media library as the URL for the media in the spreadsheet to ensure the timeline displays the right image.
It would be one less step, and many less duplicates of the same photo (multiple WP thumbnails) if the asset link in Photostructure would allow the resource to be accessed.
@mrm is there a way to get an image link ending in JPG, JPEG, PNG, etc., for either an asset or original image hosted by PhotoStructure for Servers? I checked the download links and right-clicking the image → open in new tab, but all those URLs end in just a number, no filetype extension.
As @arretx noted you can get image links from Photostructure, but none that I’ve found end in an image extension. Here’s what I’ve found with my install on PhotoStructure Server for Docker, accessible via the Tailscale VPN (which I was really happy with how easy it made it to share with my family! Also that’s not my actual Tailscale IP of course):
Lol. I tried adding jpg to my three links above with alpha.7, and you’re right two of them already work (the 1st and 3rd, but not the 2nd). Only question I guess is whether Knightlab would hotlink those “images” and actually work.
I just wrote this up in discord, and thought it might be generally informative:
To reiterate my comment above: Unfortunately, as there isn’t user authentication built into PhotoStructure yet, so if you link to a photo, and someone looks at the link, they can infer the homepage of your PhotoStructure library installation
The “correct” way to do this in the future is to actually implement this feature request by adding a public access token per asset. The URL will look something like //$yourdomain.com/public/:assetId/:token(.*)?, where :token will be some alphanumeric access token for the asset, and the (.*)? bit at the end allows people to add a .jpg to the URL, if required by some software as detailed above.
If your CMS has a “build” step where it pulls in external assets to be locally hosted, though, then, yeah, this forum post is fine.
Note that there are 2 image routers in PhotoStructure:
the “asset preview” renderer, whose path is /img/:assetId/:reducer/:width, and
the “actual” asset router, which is /img/:assetId/actual(.*)?
:assetId is the number you see in the URL when you click on an asset
:reducer is either fit or sq. fit retains the original aspect ratio. sq is an entropy-centered square crop of the asset.
:width is a guideline–PhotoStructure will return the closest-width-ed preview that it already has generated for that :reducer.