-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
Adding ability to specify a custom post thumbnail. #4425
Conversation
dessalines
commented
Feb 4, 2024
- Context: What would it take for Lemmy to become a Youtube (and Spotify) replacement? #4204
let thumbnail_url = proxy_image_link_opt_apub(custom_thumbnail, &context) | ||
.await? | ||
.map(Into::into) | ||
.or(metadata.thumbnail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should do the or
first and then proxy afterwards, to ensure that thumbnail also gets proxied. Unless thumbnail already gets proxied previously, not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the metadata thumbnail is already proxied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if a custom thumbnail is provided this will still generate a thumbnail from the url and store it in pictrs. Thats a waste of resources and should be skipped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, fixed.
I just noticed that this wont work properly as the custom thumbnail is not federated. So other instances will generate a new thumbnail as usual. |