-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
feat: original-sized previews for non-web-friendly images #14446
base: main
Are you sure you want to change the base?
Conversation
f2b631a
to
54b91b4
Compare
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.
Thank you for the PR! I mostly looked at the server code, where I think it needs some more polishing.
Re: caching, this also affects the case where the user zooms in and no extracted image exists, right? It will load the preview again.
076d59d
to
a7a9b4d
Compare
a7a9b4d
to
34592b3
Compare
any more comments from maintainers to get this merged, so that I can continue with previews of other images? |
@eligao no rush here |
I think we should wait until we're done with hot fixes for the current release. |
For a DNG image with a resolution of 5376x3956 and 41.3MiB in size, the following variants are generated using the default settings:
These generated variants seem larger than expected and don't match the configured settings, with the preview and original being identical. It's also strange that the resolution has slightly changed. |
nice catch, the file sizes are indeed wrong, let me fix that and add checks to tests. |
Hi again @eligao! We've been talking about the PR and think there are a few changes it'll need for it to be merge-able.
|
ebcfe9c
to
e22a123
Compare
8d43411
to
4cee0c7
Compare
…ullsize preview turned off
fddbc10
to
88e4dc8
Compare
I did a bit of testing with this. The image generation itself works well, but it doesn't get displayed correctly in the client. The initial image shown is the preview and zooming in shows the thumbnail. Also, the "Display original photos" user setting should probably make it load the full-size image directly and skip the preview. |
Just a heads up that I will be away for the next two weeks and won't be able to test this until I'm back. But feel free to continue working on it! I'm happy for it to be merged once the bugs are fixed and someone can confirm that it works as expected. |
Implementation details:
Server: extract and keep the original-sized preview image for non-web-friendly images
image.fullsize
image.fullsize.enabled
: toggles original-sized previewsimage.extractEmbedded
is on, it will attempt to extract and use the JPG preview from RAW images instead of converting from RAW.AssetFileType.FULLSIZE
file.OpenAPI: a new
AssetMediaSize.FULLSIZE
size is available under theviewThumbnail
APIAssetFileType.FULLSIZE
file when availableAssetFileSize.PREVIEW
FULLSIZE
preview is not yet generated.Web: photo-viewer
AssetMediaSize.FULLSIZE
preview via theviewThumbnail
APISome future ideas:
FULLSIZE
image inthe mobile client. Unfortunately I'm not familiar with flutter yet.