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

(Feature request) Api for image storage and global options for image copying in trilium #529

Open
Onionbai opened this issue Oct 28, 2024 · 5 comments
Labels
enhancement New feature or request question

Comments

@Onionbai
Copy link

Describe feature

Api for image storage

For trilium, images can be stored inside or loaded from the web, but inside storage will surely increase the size of database. I know someone using image bed storing images before they are copied to trilium notes, but every time he would upload to the image bed first rather than directly paste it to trilium. But that is not convinent.
So I am thinking whether it is possible to open an api just for image storage (e.g. easeimage2), when we paste the image, it could be uploaded to the image bed. As users, they could choose the way images are stored, stored internally, externally or loaded from the web.

global options for image copying in trilium

In trilium, there are inconvinence like #521. Though surely we could press on shared button, then all the contents could be viewed and copied in browser, or we could export note into html, and then copy it, this is not convienent.
So if it is possible to create an global button for image copying, options for internal link and image?

Additional Information

No response

@perfectra1n
Copy link

If I'm understanding the request correctly, you would want a Trilium Note to load images from somewhere like Imgur (after uploading the image to Imgur of course) and then placing the link to the image within Trilium?

@perfectra1n perfectra1n added enhancement New feature or request question labels Oct 30, 2024
@maphew
Copy link

maphew commented Oct 31, 2024

@perfectra1n Sounds like wanting to be able to Ctrl-V paste images into Trilium and have Trilium take care of uploading to the 3rd party hosting service (presumably using a 3rd party API key) -- in other words to have it behave like Stack Overflow editing does.

If such a feature were developed, I suggest making the default "3rd party" another Trilium db. This would allow differnet sync settings for each, and a "streaming vs local" experience similar to how Dropbox, Google Drive and Onedrive operate. The notes-db would be fully synchronized all the time, like now, and items in the assets-db would be on-demand. (Or configured to also be all-the-time.)

I personally would not use such a feature, the risk of losing the external content far outweighs the cost of db storage size for me. I can see how others would choose differently though.

@meichthys
Copy link

I agree with @maphew here, however I would prefer that the default to not store the photos in an external 'repository', but rather keep it as it is now - where everything is in one database and can be backed up locally without an internet connection.

@openapphub
Copy link

It's OK to put them together. My personal attempt was to write a script to compress and convert the image attachments in the database and unify the webp format, and the effect was still OK. Current size 250 M, processed 170 M

@maphew
Copy link

maphew commented Nov 5, 2024

It's OK to put them together. My personal attempt was to write a script to compress and convert the image attachments in the database and unify the webp format, and the effect was still OK. Current size 250 M, processed 170 M

It's been my intention to open an enhanment issue to have webp as default formation and compression algorithim. And/or configurable to another format. Feel free to beat me to it. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question
Projects
None yet
Development

No branches or pull requests

5 participants