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 an image_details table to store image dimensions. #4704
Draft
dessalines
wants to merge
21
commits into
main
Choose a base branch
from
thumbnail_sizes
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
- Adds an image_details table, which stores the height, width, and content_type for local and remote images. - For LocalImages, this information already comes back with the upload. - For RemoteImages, it calls the pictrs details endpoint. - Fixed some issues with proxying non-image urls. - Fixes #3328 - Also fixes #4703
dessalines
requested review from
phiresky,
dullbananas,
Nutomic and
SleeplessOne1917
as code owners
May 6, 2024 16:02
dessalines
commented
May 6, 2024
Nutomic
reviewed
May 7, 2024
Nutomic
reviewed
May 7, 2024
5 tasks
Nutomic
reviewed
May 13, 2024
Nutomic
reviewed
May 13, 2024
dessalines
added a commit
that referenced
this pull request
May 15, 2024
- This extracts only the proxy image fixes from #4704, leaving off thumbnails.
Merged
Nutomic
pushed a commit
that referenced
this pull request
May 22, 2024
* Adding an image_details table to store image dimensions. - Adds an image_details table, which stores the height, width, and content_type for local and remote images. - For LocalImages, this information already comes back with the upload. - For RemoteImages, it calls the pictrs details endpoint. - Fixed some issues with proxying non-image urls. - Fixes #3328 - Also fixes #4703 * Running sql format. * Running fmt. * Don't fetch metadata in background for local API requests. * Dont export remote_image table to typescript. * Cleaning up validate. * Dont proxy url. * Fixing tests, fixing issue with federated thumbnails. * Fix tests. * Updating corepack, fixing issue. * Refactoring image inserts to use transactions. * Use select exists again. * Fixing imports. * Fix test. * Removing pointless backgrounded metadata generation version. * Removing public pictrs details route. * Fixing clippy. * Fixing proxy image fetching. Fixes #4703 - This extracts only the proxy image fixes from #4704, leaving off thumbnails. * Fix test. * Addressing PR comments. * Address PR comments 2. --------- Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
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.
This also fixed a lot of bugs, such as all link-posts breaking when using the proxy setting.
This should probably go in
0.19.4
because of all the bug fixes, and because there are no breaking API changes (only an optional joined table toPostView
).@Nutomic I'll comment on the code here, but I was very confused by the proxying of not just thumbnails and other image fields, but the
post.url
itself was getting rewritten before. Even if that is an image link, it should stay pure/unproxied, as the primary source of record, otherwise federation and thumbnail generation would keep chaining proxy links recursively.