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

More options for generating images #100

Open
KjellConnelly opened this issue Nov 24, 2019 · 1 comment
Open

More options for generating images #100

KjellConnelly opened this issue Nov 24, 2019 · 1 comment

Comments

@KjellConnelly
Copy link

Hi! First of all, thank you for building this :) I'm using it to create a family album on github pages for free to host old photos that I scan via my phone.

I have a couple ideas, not necessary, but possibly useful:

  1. Allow images to be of a max size. Pretend I set max size to be 1800. This means that if I have an image that is 720x1280, then it stays that size. But if I have an image that is 2440x3200, then it scales down to 1372x1800.

  2. Also, allow us to set gm generic dimensions. For example, right now, an image is resized something like 8 times (I don't remember that exact number). If I have 2000 photos, that's 16,000 images + the original 2000 making my repo hold 18,000 images. That's a lot. And github pages only lets me have repos with 1gb on them. Would be nice to only have maybe 3 sizes, like small, medium, and original. Or 2. Something like that.

  3. Possibly create an option that doesn't actually create any new images at all in the build folder. Instead, it just links from the original images.

Anyways, these are all just ideas for reducing storage space. Thanks again!

@QSchulz
Copy link
Contributor

QSchulz commented Jun 3, 2020

  1. makes sense but anyway the browser will most likely stretch the picture anyway because prosopopee uses the flex-grow property in CSS. It'd be nice though not to create the stretched thumbnail. That seems feasible to me, just need to check the requested thumbnail size against the original file size and if bigger, then return the original file name for the template and copy the original file to the build directory. Done.

  2. and 3. can be done by yourself easily. You just need to create your own template (copy paste the original one, find all generate_thumbnail calls for images and replace them with copy. That should do the trick.

Note: I'm not the maintainer, merely contributed to the project.

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