usememos / memos

An open-source, lightweight note-taking solution. The pain-less way to create your meaningful notes. Your Notes, Your Way.
https://usememos.com
MIT License
34.06k stars 2.47k forks source link

Image Preview #3685

Closed fattyhk closed 2 months ago

fattyhk commented 4 months ago

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.

RoccoSmit commented 3 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

fattyhk commented 3 months ago

Thanks~

RoccoSmit commented 2 months ago

@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:

boojack commented 2 months ago

@RoccoSmit

RoccoSmit commented 2 months ago

PR for reintroducing thumbnails is ready for review https://github.com/usememos/memos/pull/3821