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 lower resolution images for faster loading times #4

Merged
merged 6 commits into from Jul 13, 2022

Conversation

FlyOrBoom
Copy link
Contributor

Currently, the website's images load very slowly. I've generated 2800x, 1400x, 700x, and 350x versions of all images used in the comparisons, and added HTML sizing declarations so the browser will automatically use the image best for the screen resolution.

@FlyOrBoom
Copy link
Contributor Author

(Difference from #1 is that this one has multiple sizes instead of just 1000x)

@Pierstoval
Copy link

The arrows don't display anymore:
image

@Pierstoval
Copy link

Awesome work by the way! Much better than my proposal :)

@FlyOrBoom
Copy link
Contributor Author

The arrows don't display anymore:
image

Whoops, I un-deleted them in another commit but forgot to push it 😅

@JohnEdChristensen
Copy link
Owner

Thanks for the PR! This looks great, would you mind creating new image versions for the better Carina Nebula images I recently added? (img/Carina_Hubble_rotated_wide_short.png, and img/Carina_webb.jpg)

Also did how did you create the different Image sizes? I'm assuming you used a tool to quickly generate them?

@FlyOrBoom
Copy link
Contributor Author

Updated! I used the command-line tool ImageMagick, which has a convert -resize option, and put that in a bash for loop.

file=carina
type=png
for size in "350" "700" "1400" "2800"
do
    convert -resize ${size}x ${file}.${type} ${file}_${size}.${type}
done

Copy link
Owner

@JohnEdChristensen JohnEdChristensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes! This will definitely help out folks with slower internet!

@JohnEdChristensen JohnEdChristensen merged commit 0cd2b10 into JohnEdChristensen:gh-pages Jul 13, 2022
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 this pull request may close these issues.

None yet

3 participants