Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: allow the inclusion of external images in galleries #24

Open
lamons opened this issue Jul 29, 2023 · 5 comments
Open

Suggestion: allow the inclusion of external images in galleries #24

lamons opened this issue Jul 29, 2023 · 5 comments

Comments

@lamons
Copy link

lamons commented Jul 29, 2023

Currently the theme generate gallery by listing image files in /content/imgaes. I think it would be useful if it's possible to include images hosted on external source, since many folks host sites on Github while Github is not ideal for hosting a large number of big image files. The way of inclusion could be - as I can come up with - putting image urls in a certain format in the gallery's index.md, or a single file containing list of urls in /content/imgaes.

@bep
Copy link
Owner

bep commented Jul 29, 2023

Yea, maybe, but I need to think about this.

What I currently do with the one site I'm building with this is to mount a folder which I don't push to Git:

https://github.com/bep/staticbattery.com/blob/ff41520823899cec71024e3d03120e3c74258277/config.toml#L48

That folder gets updated with an Album + a publish service in Lightroom.

This is works for any number of images (as long as I have space in local drive).

I think I would hate having to maintain a list of URLs/images in a file, but if I could somehow query this list(s) at build time, that would be cool ...

@bep
Copy link
Owner

bep commented Jul 29, 2023

Thinking about this, I suspect that what you want is already possible ... I'll see if I can demonstrate that when I find the time ...

bep added a commit to bep/gallerydeluxe-demo-images-listed-in-a-file that referenced this issue Jul 29, 2023
@bep
Copy link
Owner

bep commented Jul 29, 2023

See https://github.com/bep/gallerydeluxe-demo-images-listed-in-a-file

I a little quick and rough around the edges, but the concept works.

@bep
Copy link
Owner

bep commented Jul 29, 2023

Also, you can mount many remote GitHub repos into one content folder, if you want.

@lamons
Copy link
Author

lamons commented Jul 31, 2023

See https://github.com/bep/gallerydeluxe-demo-images-listed-in-a-file

I a little quick and rough around the edges, but the concept works.

Thanks! This workflow actually fits perfectly to my personal case, as I am planning to host my images on Cloudflare R2 or something similar. As for querying the list I guess it would be possible to mount the bucket to local and then mount the path to Hugo, but I guess it would be great to keep the "manual" option open.

However as I understand this solution will still load the original images to /public while building the site, is it possible to use remote images directly in the gallery? I guess generating and storing thumbnails in local is fine but the ability to point to the remote urls of images would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants