-
Notifications
You must be signed in to change notification settings - Fork 78
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
Gallery's height #14
Comments
Hi Remy, I think what you're trying to achieve could be done with a masonry approach. I think this would be cool option for the gallery component. If I get some time, I'll try to incorporate it. Thanks for the input. |
This is indeed a common problem. For the If you are on Linux this code does the trick mogrify -path static/images/gallery/thumbs/ -thumbnail 500x500^ -gravity center -extent 500x500 static/images/gallery/fulls/* |
Thanks for the #!/usr/bin/env bash
set -e
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm use --silent 15
for f in ./originals/*
do
NODE_OPTIONS=--max_old_space_size=8192 \
squoosh-cli \
-d ./thumbs \
--mozjpeg auto \
--resize '{
"enabled":true,
"width":200,
"height":250,
"method":"lanczos3",
"fitMethod":"stretch",
"premultiply":true,
"linearRGB":true
}' \
--max-optimizer-rounds 10 "$f"
done And a similar one #!/usr/bin/env bash
set -e
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm use --silent 15
for f in ./originals/*
do
NODE_OPTIONS=--max_old_space_size=8192 \
squoosh-cli \
-d ./optimized \
--mozjpeg auto \
--max-optimizer-rounds 10 "$f"
done |
Hi there
When I look at https://themes.gohugo.io/theme/hugo-story/, your gallery's neat and clean. It's because all the images' height are the same.
So I processed my own images to generate thumbs (using squoosh-cli) of the same height. But it look messy, because your gallery component stretch the result for every image to have the same width. Maybe it should be based on height, or you should have a style option for this behavior ? Or maybe I'm not a pro on this topic and everyone do it likes you do and I learnt something.
Cheers,
The text was updated successfully, but these errors were encountered: