LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.42k stars 303 forks source link

[Enhancement] Shorter shared album URLs #1225

Closed zkvvoob closed 2 years ago

zkvvoob commented 2 years ago

Hello,

Could you perhaps see your way to simplifying the URL of a shared album? What I'd really like to be able to have is no /gallery slug, no #sign and the album ID to either be with fewer digits or, even better, a random alphanumeric string.

The reason for this is, when I share a link in a DM on Instagram, because of the #, the URL doesn't get converted into a link and some less tech-savvy recepients can't actually click on it.

Thank you!

nagmat84 commented 2 years ago

If you click on the "Share" button in the menu and select "As link", you will get a link for the currently visible photo/album which does not contain a hash tag. The URL will look like https://your-domain.tld/r/<album-id>/<photo-id>. The r in the URL stands for "redirection".

We actually have built this feature, because we are aware of the problem that Twitter and some other social media channels don't respect the HTTP standard, grab the hash tag for their own purposes and behave silly, if a hash tag occurs in a URL.

When you migrate to version 4.5.0 you will also see random alpha-numeric IDs. However, they are not shorter and cannot be made shorter without compromising security. Their length is selected to provide at least 128bit randomness in the IDs.

nagmat84 commented 2 years ago

As someone has asked somewhere, what I meant and where the button is. Here are the screenshots:

For albums:

Screenshot_20220215_185235

For photos:

Screenshot_20220215_185348

Screenshot_20220215_185503