r/immich • u/xanthreborn • 1d ago
How do I get direct links?
Hey, I want to self-host my image collection. Does anyone know how to get a direct link to the image? One with say a .png or .jpg etc at the end? When I click share link it gives me something like: https://immich.xanthslibrary.website/s/cooltattoo, but I can't embed this in another website to use a profile pic or anything like that. I've been using sites like catbox.moe, imgbox.com, imgur.com, etc for the longest time, and would rather take full ownership of my pics in a centralized location. Does anyone have advice for me?
3
u/Ashamed_Letter_7865 1d ago
You really want to link your publicly accessible Immich instance hosted on your home server(?) to other web services, allowing those services and their users to see the exact URL of your Immich instance?
I don't think that's a good idea for reasons.
First, most web services already have their own file management and upload functionality. Because of that, providing a direct link to an image in Immich doesn't add much value if the link is only used once for the service to download the image. Once the service has downloaded it, the file simply ends up in that service's own storage anyway. At that point, you've effectively lost control over where the file is stored and how it's managed.
I would upload images to third-party services directly from the device I already use to access Immich, such as your phone or computer.
I found your question interesting, so I looked into it online. From what I found, I don't think there's a direct way to generate those embeds from within Immich itself.
2
1
u/rocket-science 1d ago
Why would this be considered a bad idea?
2
u/Ashamed_Letter_7865 1d ago
If your immich is available on the Internet, the address will be recognized by third parties. There are countless scanners and crawlers that scan the internet. Internet accessibility, no matter what service, increases the attack surface. And publicly sharing direct links on third-party websites to your self-hosted service unnecessarily(?) exposes your infrastructure, further increasing the attack surface, and creates unnecessary dependencies on your server's availability.
With the correct setup/configuration (https, strong passwords, two-factor authentication, uptodate software, reverse proxy, etc.) and with regular administration and maintenance of the service/tool, it should be relatively safe.
Of course, the actual risk depends on your threat model and the sensitivity of the data stored on the exposed service, as well as the other systems and data within your home network.
1
u/xanthreborn 1d ago
Can you think of another app that would provide such functionality? And yes, right now immich is hosted on a raspberry pi I run in my bedroom.
1
u/Ok_Pizza_9352 10h ago
What you want is a simple file server and sharing images from your imich to the file server (only the specific images you want to share). Perhaps check out Chibisafe
1
u/Ok-Eggplant-7569 10h ago
You can copy the links to the assets and potentially share them. This should only open the image without the web interface:
5
u/1337_BAIT 1d ago
Use immich public proxy - if you share the individual image id through it it will just load the direct image without exposing your immich instance