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

Please make 'thumbnailRatio' as a Runtime Option #4374

Open
ylyxf opened this issue Feb 6, 2025 · 1 comment
Open

Please make 'thumbnailRatio' as a Runtime Option #4374

ylyxf opened this issue Feb 6, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ylyxf
Copy link

ylyxf commented Feb 6, 2025

Describe the solution you'd like

It would be great if ThumbnailRatio can be config when memos start。
It wolud be more great if ThumbnailRatio can be config as steps , for example:
--thumbnail-ratio some_expression
some_expression will tell memos : when size>5M,set ratio = 0.3; when size > 3M & size < 5M , set radio = 0.6 ; default 0.8

Type of feature

Other

Additional context

The network bandwidth of my website is insufficient, the default ThumbnailRatio value 0.8 (resource_service.go line 394) maybe too big.

@ylyxf ylyxf added the enhancement New feature or request label Feb 6, 2025
@RoccoSmit
Copy link
Contributor

RoccoSmit commented Feb 6, 2025

As far as i know the widest a thumbnail image will be in the current UI is 940px (in the user feed). It would be good to scale down thumbnails to that size / use that ratio.
This was discussed while the feature was added. Cant remember off the top of my head why the ratio of 0.8 was chosen. Could have something to do with not linking the thumbnail width to the current UI width in case the UI changes. it could also be that users with larger than 1080p screens have a wider feed? Not sure.
I ended up writing a separate script that loops through the thumbnails folder and resizes images that arent resized to 940px width to fit my setup

@github-actions github-actions bot added the Stale label Feb 20, 2025
@johnnyjoygh johnnyjoygh self-assigned this Feb 21, 2025
@johnnyjoygh johnnyjoygh removed the Stale label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants