obsidian-media-db-plugin icon indicating copy to clipboard operation
obsidian-media-db-plugin copied to clipboard

Save images locally

Open curiousignite opened this issue 1 year ago • 8 comments

Images should be saved locally in a specified folder for offline use.

curiousignite avatar Jun 17 '24 23:06 curiousignite

+1

foegra avatar Jul 13 '24 09:07 foegra

There is a PR to sort of make this possible, but it's held up by something. I'm not a developer so I'm not sure of the situation. I use a work around right now.

I use "Local Images Plus" (LIP) plugin to make all embedded images local. I turn off the auto mapping of "image" in the media configuration of Media DB (e.g. Series or Book), and then add it to the template yaml as image: "![{{ title }}]({{ image }})" for that media type, making sure to choose that template in the Media DB configuration area. When I add a new series via Media DB, everything is brought into yaml as expected, the LIP downloads the image and changes the yaml to link to the local copy of the file: image: "![[6f831825c980679eb035f35716558fef_MD5.jpg]]". The locations of the downloaded files are handled by LIP correctly.

I hope this helps anyone in my situation, sorry if this isn't the appropriate place for this, I'm happy to move it somewhere else. Looking forward to this PR eventually making its way into the plugin. Thanks everyone for all your work on it!

PeterBeckley avatar Jul 24 '24 14:07 PeterBeckley

I agree, it would be great if there were a switch so that images could be stored in local storage as attachments. I'll try out the above suggestion, but I would prefer it to be an in-built feature.

BEBIUS avatar Feb 03 '25 10:02 BEBIUS

I mean, of course, that's the nature of a feature request.

PeterBeckley avatar Feb 03 '25 10:02 PeterBeckley

This was recently added but not yet available in the latest release, if you'd like to test this feature you can install the pre-release version of media-db using the BRAT plugin

Image

You can then enable downloadable images in media-db settings

Image

ltctceplrm avatar Jun 20 '25 19:06 ltctceplrm

Just wanted to add that, as of the latest version (0.8.0-canary.20250831T095023), images are not downloaded for books

p-a-b-lo avatar Sep 09 '25 19:09 p-a-b-lo

Also, links to images are stored between double quotes in the image property, e.g.: "[[Media DB/images/series_Lost (2004–2010).jpg]]" instead of [[Media DB/images/series_Lost (2004–2010).jpg]], which is interpreted by Obsidian as a string literal instead of a link to a file

p-a-b-lo avatar Sep 09 '25 19:09 p-a-b-lo

The double quotes are actually correct but it seems that right now those double quotes have single quotes around them which breaks the formatting, I'll look into it

ltctceplrm avatar Sep 09 '25 20:09 ltctceplrm