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

Generate thumbnails for images used on homepage #6

Open
takluyver opened this issue Oct 10, 2017 · 4 comments · May be fixed by #31
Open

Generate thumbnails for images used on homepage #6

takluyver opened this issue Oct 10, 2017 · 4 comments · May be fixed by #31

Comments

@takluyver
Copy link
Member

takluyver commented Oct 10, 2017

To save bandwidth and make the site load faster, we want smaller versions of photos for use on the homepage. @tsaoyu wrote a script to do this once for all posts:

https://github.com/Maritime-Robotics-Student-Society/blog/blob/gh-pages/utilities/optimize_thumbnail.py

It should be easy to do this for a new post when we've written it. It could even be configured as a git commit hook.

@zysim
Copy link
Contributor

zysim commented Mar 28, 2018

Created this branch to solve this. This is the commit in particular, but mind it isn't the latest commit in the branch. If the pull request #13 gets resolved, I can create another pull request for this branch too.

@zysim
Copy link
Contributor

zysim commented Mar 29, 2018

Take note too this script doesn't have any error handling for now. So if optimize_thumbnail.py fails, git will still move on to displaying the commit message window.

@takluyver
Copy link
Member Author

Does the error show up in the terminal if it fails?

@zysim
Copy link
Contributor

zysim commented Mar 2, 2022

Sorry I had to get some dinner :P

Went through my script and well; it actually does. Although if the hook itself, as well as optimise_thumbnail.py (renaming that btw) errors, the hook will still allow you to proceed.

I'll make a new PR that'll have error handling.

@zysim zysim linked a pull request Mar 2, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants