dyreschlock / schlock-website

Personal Website code to be run locally or generate a static website hosted through github pages.
http://theschlock.com/
0 stars 0 forks source link

Create unique UUIDs for images instead of standard filenames #76

Closed dyreschlock closed 1 year ago

dyreschlock commented 1 year ago

For images now, we're generating webp files for all images on the site. These images keep the same filename, but we could go a step further and create unique UUIDs for images and use those UUIDs as their filenames. Then, if a user is downloading an image, they won't know the original filename. This is added security as anyone could easily download all images from github.

To create the UUID, we could combine the id, directory, gallery name, and filename and then MD5 hash it all. We could throw some hyphens here and there to make it look presentable, like this "6057f13c-496ecf7f-d777ceb9-e79ae285" We could go a step further and create an obscured folder structure, too.

dyreschlock commented 1 year ago

Instead of doing something completely scrambled, it might be good to do a hybrid of post-name and hash.

dyreschlock commented 1 year ago

Nah, let's not do this. It become a lot of work to rename things. And getting a link for an image is easy now.