Closed fattyhk closed 2 months ago
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
Thanks~
@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?
@RoccoSmit
PR for reintroducing thumbnails is ready for review https://github.com/usememos/memos/pull/3821
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.