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

Investigate possibility of adding photos for each candidate #76

Open
V-ed opened this issue Jan 13, 2020 · 2 comments
Open

Investigate possibility of adding photos for each candidate #76

V-ed opened this issue Jan 13, 2020 · 2 comments
Assignees

Comments

@V-ed
Copy link
Member

V-ed commented Jan 13, 2020

While it would mean that the data would be much bigger, and woud bring a much bigger load on my server, the idea that there could be a way to quickly visually know what does the candidate looks like is rather interesting.

The main issue about this is how much should I restrain image sizes. This is important since the quickest way to have these photos ready would be to take them on the spot, but photos taken by phones nowadays could easily reach 3+MB (a single photo taken from my phone is about 3.6MB).

If this is to be implemented, I would need to research about compression algorithms available for javascript, keeping the best quality while only allowing a max size for loads.

This also means that my server will need to accept a max 2MB logo and max 2MB * n candidates images (n being the number of candidates added). This means I have absolutely no idea how many photos will be in the request.

This also means that my server will be downloading probably 20MB of data on election creation, and serving 20MB of data for every new device that joins the election... while it is an acceptable margin of maneuver, I'm still not convinced this is a great idea...


Also, there is currently a use case where you can take a picture of every candidates one next to each other in order that they are entered in the setup, and use this photo as the group logo, meaning the image will be on top and useful for knowing who is who.


Finally, I would need to implement for this an image viewer widget to the voting page, so that you can see the image in full size to not have too small devices not be able to show the image big enough.

@V-ed V-ed self-assigned this Jan 13, 2020
@V-ed
Copy link
Member Author

V-ed commented Feb 17, 2020

Possible solution to scaling images locally : https://stackoverflow.com/a/43441441

@V-ed
Copy link
Member Author

V-ed commented Feb 17, 2020

Interesting idea to put a button next to the candidate to take a photo on the page : https://stackoverflow.com/q/17004981

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

1 participant