Adding ability to specify a custom post thumbnail.#4425
Merged
Conversation
Member
dessalines
commented
Feb 4, 2024
- Context: What would it take for Lemmy to become a Youtube (and Spotify) replacement? #4204
Nutomic
reviewed
Feb 7, 2024
Nutomic
reviewed
Feb 7, 2024
Nutomic
reviewed
Feb 13, 2024
| let thumbnail_url = proxy_image_link_opt_apub(custom_thumbnail, &context) | ||
| .await? | ||
| .map(Into::into) | ||
| .or(metadata.thumbnail); |
Member
There was a problem hiding this comment.
Should do the or first and then proxy afterwards, to ensure that thumbnail also gets proxied. Unless thumbnail already gets proxied previously, not sure.
Member
Author
There was a problem hiding this comment.
Yep, the metadata thumbnail is already proxied.
Member
There was a problem hiding this comment.
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.
Nutomic
reviewed
Feb 13, 2024
Nutomic
approved these changes
Feb 15, 2024
Member
|
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. |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.