Notion photo gallery widget
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.
Code
The example code is here 👇
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