🤳

Notion photo gallery widget

💡
This html widget shows a few photos you are proud of and willing to share, it keeps the aspect ratio of the original photo with two buttons for going to the previous and next photos. It automatically reads all the photos you throw into the GitHub repo.

Setup

This post inspired me to ask chatGPT to create this photo gallery that automatically reads all the photos you throw into the GitHub repo. To keep in mind the repo seems to have a soft size limit of 5GB and a hard size limit of 100 GB. The problem with the original photo gallery from the below post is it does not keep the aspect ratio of the photo you through in and it requires to hardcode all the photos corresponding to their file names.

The setup on GitHub, etc is the same as shown in this original post. Just need to use my code instead.

How to embed any number of HTML widgets/snippets into Notion app for free · Shorouk's Blog
a tutorial that will show you how to embed any number of HTML widgeits or snippets into your Notion app page. Completely free without ads.
https://blog.shorouk.dev/2020/06/how-to-embed-any-number-of-html-widgets-snippets-into-notion-app-for-free/

Code

The example code is here 👇

https://github.com/hyhsuen/notion_widgets/blob/main/gpt_photoGalleryButton.html

Replace Placeholders: Don't forget to replace 'your-username', 'your-repo', and 'path/to/your/images' with your actual GitHub username, repository name, and the path to the images directory in your repository.

fetch('https://api.github.com/repos/your-username/your-repo/contents/')

Voilà

copy the HTML (https://hyhsuen.github.io/notion_widgets/gpt_photoGalleryButton.html) to your Notion workspace and create an embed

How do you like this Post?