sergei-korneev / obsidian-local-images-plus Goto Github PK
View Code? Open in Web Editor NEWThis repo is a reincarnation of obsidian-local-images plugin which main aim was downloading images in md notes to local storage.
License: MIT License
This repo is a reincarnation of obsidian-local-images plugin which main aim was downloading images in md notes to local storage.
License: MIT License
The approach of the plugin is fantastic. I loved the old one and from what I see, your new version is going to improve it a lot. Thanks again for that!
One thing I always got annoyed by: I use a lot the option to "Download images locally for all your notes".
There are two griefs I have with that:
Now I wonder:
Is there any way to exclude notes that have not changed since the last download?
This would save so much time.
All the best!
https://mp.weixin.qq.com/s/e_0eezfDa94c_tbcF7UxJA
This page can not be downloaded correctly, there will be an incorrect replacement
Hi, if the plugin supports formatting the {date} variable by the Moment format options, it will help alot.
Thanks for grate plugin!
It is good to take control of all download images and content from web pages and use subfolders with $(notename) to storage them.
MarkDownloader can't download images to relative pathnames to actual
" $(notename) " location.
There for I've created a folder attachments in the root of Valt and it saves content of all markdown files from various folders in one specific location - Vault/attachements/$(TitleName) and it's work fine.
While using you Pligin, I've found In you settings no option to use 'Media folder' not relative to the
" $(notename) "
pathname, but only fixed location. Is it possible to add option to set hard path to 'Media folder' and not to use only ralative paths to " $(notename) " location?
Grate thanks!
Images being pasted work though.
I checked the code and noticed that editor-drop
event wasn't registered. Not sure if it is the cause.
As the title says, it would be another way of keeping images local.
What do you think?
Please support not replacing the local image resource path after downloading the image
1.3.5
Windows 10
Because this can always be traced back to the original source of the image, it is hoped that a setting item can be added to allow users to decide whether to replace it with a local image path
Thank you so much for your extension!
Please read this guide:
I still need use wikilinks in obsidian,but not on image~
and by the way how to not use the _MD5 as the suffix of the filename?
I use the MD5 as the filename but not need the suffix. could add this?
Originally posted by @Tback1 in #29 (comment)
Basically, Obsidian mobile doesn't have plugins able to download images from url addresses into our notes and the attachments folder. This problem stands already for a very long time for mobile users and nobody ever filled this gap.
Being able to download multiple images of the active note into Obsidians attachments folder, eventually named after a note name, followed by a counter, eg. topic-01
, topic-02
, etc
Downloading and adding multiple images by hand is time consuming but currently the only way to add images to notes.
It doesn't work when renaming image names using MD5 is disabled and you want to keep the original image names and resource directory names
1.3.5
0.15.7
Windows10
When I disable rename image names with MD5 and want to keep the original image names vs resource directory names, it doesn't work, it always renames image names with resource directory names using MD5 which is very frustrating. I hope you can fix this error in time, thank you very much for your excellent extension. 👍😜
Because such a file path looks very incomprehensible😒
Thank you very much! I have been using the local images plugin before, but it hasn't been updated for two years and its features can't meet my needs. For example, I want to place images in the relative path of my notes, but this plugin cannot achieve this. I once tried to modify the plugin myself, but later found out that you have already done this, and I am truly grateful for that!
01234.jpg
, and this will store in _resources/0/1/01234.jpg
. and the 00123.jpg
will store in '_resources/0/0/0123.jpg`i have 14852 images in valut, using the date folder is not good way to me. someday i dont save image, but someday i store a lot images.need this feature.
or add an option to allow me to customize the format of the timestamp? like ${date:YYYYMM}
=> 202306
.
plz consider it.
_MD5
, and the type folder like img
? the path too long may cause some issues.thanks for this great plugin
I was trying to use this to embed a PDF and it broke on an admittedly unusual URL structure. This is the URL it broke on:
https://www.jacionline.org/article/S0091-6749(16)30948-4/pdf
Specifically, it was getting parsed as this:
https://www.jacionline.org/article/S0091-6749(16)
I finally tracked the problem down to this line's regex:
obsidian-local-images-plus/src/config.ts
Line 15 in a619806
and found it seems to work correctly with this slightly modified version:
/\!\[(?<anchor>(.{0}|.+?))\]\((((?<link>(http(s){0,1}).+?)(\) {1,}|\)$|\)\n|\)\]|\)\[)))/g
with the bonus that this version doesn't capture the termination like the previous version, so no newline and spaces in the result.
Please make it possible to also download previews created by Auto Card Link plugin
![img](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f6f0a43c7a1c407ab75b3bbb37c0dc63~tplv-k3u1fbpfcp-zoom-1.jpeg)
![img](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/277c7243c88a4710aa6aaf5b8a269f3c~tplv-k3u1fbpfcp-zoom-1.jpeg)
I think it's because the slice is too short.
nodejs v18.13.0
!(async function () {
const enc = new TextDecoder('utf-8')
const file1 = await fetch(
'https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f6f0a43c7a1c407ab75b3bbb37c0dc63~tplv-k3u1fbpfcp-zoom-1.jpeg',
{ responseType: 'arraybuffer' }
).then(res => res.arrayBuffer())
const code1 = enc.decode(file1.slice(0, 15000))
const file2 = await fetch(
'https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/277c7243c88a4710aa6aaf5b8a269f3c~tplv-k3u1fbpfcp-zoom-1.jpeg',
{ responseType: 'arraybuffer' }
).then(res => res.arrayBuffer())
const code2 = enc.decode(file2.slice(0, 15000))
console.log(code1 === code2) // true
})()
This is a pure Feature Request: For a more atomic approach, a command to "Download Media Files for Current Note" and/or "[...] Current Selection" or "[...] currently selected Link" would be great.
здравствуйте
Скажите, вы не могли бы реализовать функционал плагина https://github.com/reorx/obsidian-paste-image-rename?
Дело в том что он не совместим с кириллицей, и просто отбрасывает кириллические символы
Автор плагина ни как не реагирует на сообщения на наличие проблемы
I would love to see self defined options for having attachments sorted away into folders, ideally with a way to organize it in a subfolder fashion.
I very much hope that this can be realized!
In this case I would love to have an option to "sort things according to defined rules", something like a one button solution that moves all files from where they used to go to where they will be from now on.
So, If they used to be in
THANK YOU for your hard work!
Is your feature request related to a problem? Please describe.
It doesn't effect when pictures are “webp” format. It works when the format are png & jpeg, but when copy a batch pictures from internet , the default format become webp, and the rules uneffect!
Describe the solution you'd like
hope to support webp format , especially copy a batch pictures from internet!
Describe alternatives you've considered
when copy some words and pictures more than one , the format changed, from png or jpeg become webp, and rename rules useless
it works when copy a single png picture
It doesn't effect when pictures are “webp” format (copy more pictures become webp format)
Hello, I don't want to modify the names of the PDFs I drag from external sources using MD5, I just want to keep the original file names. Is it possible to add a feature to exclude specific files from being renamed?
I separated my notes by theme into folders and I wanted each theme to have it's own "shared" image folder, so I configured the plugin like so:
Unfortunately in this case "Remove all orphaned atachemnts" doesn't find any attachments since the "plugin" setting requires this condition to be fulfilled, and I don't have ${notename}
present.
if (noteFile.path.match(includeRegex) &&
path.basename(oldRootdir).includes("${notename}") &&
!oldRootdir.includes("${date}")) {
I recently encountered an issue with Obsidian Git throwing an exception related to Buffer.isBuffer
which, after extensive troubleshooting, I traced back to the update of Local Images Plus from version 0.15.8 to 0.15.9.
The override of the global Buffer.isBuffer
method in v0.15.9, aimed at addressing a Jimp buffer package issue, has inadvertently created conflicts with Obsidian Git and potentially other plugins. This global override changes the behavior of a fundamental Node.js method across all plugins sharing the environment, leading to unexpected errors and malfunctions.
Here's the relevant change from commit #48 in utils.ts
:
//Jimp buffer package fix
Buffer.isBuffer = (e) => {
return (
e != null && (
Object.getPrototypeOf(e) instanceof Uint8Array &&
typeof e.constructor.isBuffer == "function" ) ||
(e.isBuffer || e._isBuffer)
)
}
I suggest a localized solution to the Jimp buffer issue that steer clear of global method overrides, to ensure broader compatibility.
Hello, I really like your plugin. I am not a fan of Markdown's poor image management capabilities, but your plugin has given me great confidence in managing images in my Markdown notes and Obsidian. I would like to ask if it is possible to name images downloaded in a similar way to Paste Image Rename, based on the note name, since you mentioned a conflict with the Paste Image Rename plugin which made me give up using Paste Image Rename.
Hey guys,
I noticed that you warn users about applying this command to all the notes by mistake so you are aware of the problem, why nit adding an option in the settings to disabling it. If someone like me don't need it and is worried to hit it by mistake he can disable that option in the settings.
And thank you for this plugin, I am long time user of the old version of this plugin and just found out about the new version. I have been using "unique attachment plugin" and "MDlinks to Wikilinks" and QuickAdd to make macros and do what new version does with a single command. So I was pleasantly surprised today seeing this. Thank you very much.
the old obsidian-local-images download the image use the markdownlink, Could add an option for the feature ?
md link have two advantages:
1 markdown_link can edit in VScode or Typora, wiki_link can't
2 markdown_link can "name(annotation)" the picture,the wiki can't
When I pasted text and images from a word document, I still hat links to where the images are linked to in word. For example file:///C:/Users/.../AppData/Local/Packages/oice_16_974fa576_32c1d314_bac/AC/Temp/msohtmlclip1/01/clip_image023.png
would be nice, if this would also be moved to the vault.
♥
Some plugins use the frontmatter as a cover. This estructure is the next one:
local
banner: "![[images/af6950d07cb5c03525295905f4672b77.jpg]]"
on-line
banner: "https://images.pexels.com/photos/7376/startup-photos.jpg"
Would it be possible to also detect the images in the frontmatter?
Hi, I noticed a small typo in the Plugin-Settings.
The description of the Intercept clipboard events option says:
Plugin will also process drug&drop, copy/paste events (for files and screenshots).
hi,
I am wondering if there exist a solution that can automatically remove the attachments when delete the corresponding notes, or scan all the notes to determine whether some attachments should be removed or not.
cause when number of notes goes larger and larger and the tree structure of folders become more complex, it is hard to deal with the relationship between note and attachment when something goes wrong that needing fixed manually, such as image link or sync problems. In addition, it is also difficult to delete image and other things manually in lots of files when deleting notes to avoid storage space problems.
if there is a solution to solve this problem? if it already exists, please tell me.
thanks
The plugin name is misleading as it doesn't exclusively localize images. In addition, not using title case makes the plugin name difficult to read
Thanks for grate plugin!
Is it possible to process on copy-paste or drug-and-drop operations for local hard disk content (originally located not in Vault) to storage them on Vault in hard paths like:
" Vault/attachments/$(notename) "
location or relative to notes locations paths like:
" ./attachemets/$(notename) "
?
It seems only rule from Settings->Files & Links->Default location for new attachments works and not any rules from Local Image Plus taking in order.
Do we have any other solutions to achieve this goal?
Grate thanks!
When this plugin is active, pasting an image into Obsidian sends significant data to the net. Is this upload necessary? What is uploaded?
The current description of this command is confusing
the command 【Download all media files (Plugin folder)】 should be changed to 【Download all media files (Plugin folder) for current note】
the command 【Download all media files (Obsidian folder)】 should be changed to 【Download all media files (Obsidian folder) for current note】
![An axial leaded NTC](https://eepower.com/uploads/education/ntc_thermistor_axial_100px.jpg "Axial leaded NTC") is a valid link format that gives the "description" on mouse over. The converted file would be ![[ntc_thermistor_axial_100px.jpg|"Axial leaded NTC"]]. For reference the pipe also allows for resizing the image if it is a number instead of a string.
Currently this just errors out.
An option to keep the [name|"description"](ntc_thermistor_axial_100px.jpg) format would be nice if possible as well.
Thanks for this awesome plugin.
can the web download file path set to a more short way ?
actually,the picture is associated to the root directory, and it can be simplified as “./images/xxxx.png”
when I copy my note,the picture will disappear because the relative path is wrong
Вопрос про плагин. Я на Mac сделал вставку через буфер обмена документа с картинками из Word. Картинки получились вида:
Question about the plugin. On my Mac, I pasted through the clipboard a document with pictures from Word. The pictures came out looking like:
![](file:////Users/user/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_image001.jpg)
Судя по всему ссылки вида file://// плагин не обрабатывает.
Apparently the plugin does not handle links like file:////
Временное решение сейчас - скопировать Word документ в Google Drive - там открыть через Google Docs и от туда скопировать в Obsidan.
A temporary solution right now is to copy a Word document to Google Drive - open it there via Google Docs and copy it from there to Obsidan.
I'm facing a serious issue with the plugin simply not working as expected on a vault. It processes the file and says "Page xx has been processed, and nothing has been changed". The vault is synced with Obsidian Sync. Another vault with the plugin works as expected, however. I verified that the plugins installed in each vault are identical and the settings page for Local Images Plus is also identical across the vaults. I've tried uninstalling and installing the plugin in the problematic vault multiple times, but I'm still facing the issue. I can see the plugin make a folder for the note name per the configuration, but it's not renaming the file with the MD5 hash and moving it to the newly-created folder. What are other things I could try to debug this issue?
Obsidian version: Version 1.4.14
Local images plus version: 0.15.7
macOS version: 13.5.2 (22G91)
I don't like the filename "Pasted XXXX", I hope obsidian-local-images-plus can rename the pasted image, but when I paste an image, it doesn't work sometimes, sometimes it works, what's the problem?
I used sandbox warehouse testing.
Please check out my experimental video.
Since the latest version (0.15.8) the plugin Local REST API stopped working.
More details is provided here :
coddingtonbear/obsidian-local-rest-api#79 (comment)
coddingtonbear/obsidian-local-rest-api#79 (comment)
The author said he could help
https://github.com/esodesod
I was using version 0.15.7 without problem as the other users mentioned on the post.
I have used Microsoft OneNote extensively in the past. One thing I like about their feature is that the images I uploaded on my notes, it was linked automatically to my account Microsoft OneDrive.
Every time when I went to reinstall and re-download the notes, the image that comes with the notes will download to my local computer automatically and use the image paths that have been downloaded but still keep the external URL backup just in case something is going to happen.
These features from OneNote made me feel safe. Right now when I try to use this plugin and download the external URL image, then what happens is that the external URL is overwritten and points to the reference of the local Obsidian media folder instead, and this makes me feel insecure! What if the images I have on my local computer do not exist anymore if I need to download my Obsidian Vault to another computer one day?
It would be very nice if this plugin can behave like Microsoft OneNote.
Hope to hear from you @Sergei-Korneev 🙂
Hi there,
thanks 1stly for this powerful plugin. Just curious will this plugin replace the online link in the MD automatically or I need to replace manually which would be a huge work.
Cheers,
L
download first pic from local article fail,but others in article success. also success by downloading from the webpage.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.