go-shiori / shiori

Simple bookmark manager built with Go
MIT License
9.34k stars 554 forks source link

Manual upload of cover picture #994

Open imclint21 opened 1 week ago

imclint21 commented 1 week ago

Hi,

For some bookmarks I would be able to upload a custom image when the automatic fetching does not works.

Regards

mayur1377 commented 1 week ago

hey @imclint21 , I can give this a try :)

imclint21 commented 1 week ago

would be awesome!

mayur1377 commented 1 week ago

the way the images are stored is quite inconsistent , make it difficult to work with :) made a workaround for have a "random" placeholder if it was unable to fetch images from the provided URL , lemme know if I can go ahead and raise a PR :)

imclint21 commented 1 week ago

I would recommend to use https://place-hold.it/ or something neutral for default image,

Also i'm not maintainer of this project :D

mayur1377 commented 1 week ago

@fmartingr , lemme know what to do :D

fmartingr commented 6 days ago

Unsure what the ask is here. It is uploading thumbnails or it is having placeholders for bookmarks without thumbnails? (I'm against placeholders)

@imclint21 As a workaround, you can put an image into the $SHIORI_DIR/thumb folder named after the ID of the bookmark. That is, if you upload an image file named 44 in that folder it should show up as thumbnail. This may change recently if we normalize data in the database but should work as of today.

imclint21 commented 6 days ago

You can edit all the metadata of any bookmark why not let the possibility to upload a custom thumb like I can edit the title?

I'm sure @mayur1377 can handle it quickly, just need to upload the new image in $SHIORI_DIR/thumb as you said.