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

Image Preview #3685

Closed
fattyhk opened this issue Jul 14, 2024 · 5 comments
Closed

Image Preview #3685

fattyhk opened this issue Jul 14, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@fattyhk
Copy link

fattyhk commented Jul 14, 2024

Describe the solution you'd like

After uploading a large number of images and videos, the loading has become noticeably slower and more laggy. Could we implement a preview feature that only loads thumbnail images for browsing, and only loads the full images or videos when they are clicked?

Type of feature

User Interface (UI)

Additional context

No relevant options found.

@fattyhk fattyhk added the enhancement New feature or request label Jul 14, 2024
@github-actions github-actions bot added the Stale label Jul 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2024
@boojack boojack reopened this Aug 9, 2024
@boojack boojack removed the Stale label Aug 9, 2024
@RoccoSmit
Copy link
Contributor

Thumbnail functionality was added to v0.13 and then it was then removed in v0.22 as part of the "refactor: update resource binary request handler" commit.
Feedback from Steven re deleting the functionality: "the reason for removing it before was probably refactoring and wanting to keep the code tidy and thus improve maintainability"

Link to removal PR for the final state of the resource/resource.go file containing the thumbnail generation logic.
resource/resource.go

I asked in Discord if Thumbnails could be re added and the response was positive.
https://discord.com/channels/1017113925776588902/1045138348165050409/1270757936293085194

@fattyhk
Copy link
Author

fattyhk commented Aug 9, 2024

Thanks~

@RoccoSmit
Copy link
Contributor

RoccoSmit commented Aug 14, 2024

@boojack, I did a poc for adding thumbnails back into the latest source code and the original code for thumbnails still works nicely.

I was interested in find out your thoughts on:

  • Where should the thumbnails live for the 3 storage types? Currently the resource thumbnail get generated in a local resource cache folder for local storage and databases storage (i didnt test s3 but I believe it might do the same here as well). Would the end goal be for these thumbnails to live in local / db / s3 depending on the user's storage preference? or is having local cache good enough for now

  • The generation of the thumbnail was originally done in the resource get/stream method rather than the resource creation method. I'm assuming this was done to ease backdating the generation of thumbnails for existing resources. is the intention to leave this behaviour and add the generation of thumbnails to the create method as well. Or should there be an initial, one-off, bulk thumbnail creation process for resources that do not have thumbnails and then only create new thumbnails in the create method?

@boojack
Copy link
Collaborator

boojack commented Aug 14, 2024

@RoccoSmit

  • Thumbnails should reside in the local file system as an optional cache.
  • It’s recommended to maintain the previous approach: only attempt to access the thumbnail when requested, and if it doesn't exist, create it and then return it.

@RoccoSmit
Copy link
Contributor

PR for reintroducing thumbnails is ready for review #3821

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