Giter VIP home page Giter VIP logo

obsidian-local-images-plus's People

Contributors

public-void-ryan avatar sergei-korneev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

obsidian-local-images-plus's Issues

Rescanning "all your notes"

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:

  • It takes AGES with my vault as I have a lot of content with images and schematics.
  • Some articles "hang" for a long time, I can see them stalling in the little progress window.

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!

@in url , the file name is error

urlhttps://pics1.baidu.com/feed/0ff41bd5ad6eddc42098b2247d5059f553663301.png@f_auto?token=22f6633d9fa0c5580825f68b0adbb352

the name in md is 804e1e466ddd57e72df8bec098233375_MD5.png@f_auto
image

Process content from extenal links to the folder Vault/attachements/$(notename)/

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 dragged from a browser and drop to obsidian md doesn't get saved to local

Repro steps:

  1. Install this plugin and enable it
  2. Open Edge/Safari(Chrome somehow doesn't support drag and drop to obsidian, not sure if it is an Obsidian bug)
  3. open a page with images in the browser (e.g. https://github.com/Sergei-Korneev/obsidian-local-images-plus/tree/main)
  4. drag an image (like in the description) and drop it to obsidian
  5. the link of the image stay as remote link without being converted to local path

Images being pasted work though.

My environment

  1. Microsoft Edge Version 118.0.2088.61 (Official build) (x86_64)
  2. macOS Version 14.0 (23A344)
  3. Obsidian Version 1.4.16 (Installer 1.4.16)

My Guess

I checked the code and noticed that editor-drop event wasn't registered. Not sure if it is the cause.

FR: Mobile version

Feature request

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.

Expected result

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

Workaround

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

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
image

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. 👍😜
image
Because such a file path looks very incomprehensible😒

Thans you very much!

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!

Can you store images by the first few letters of the image?

  1. like i got a image called 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.

  1. can i remove the Suffix _MD5, and the type folder like img? the path too long may cause some issues.

thanks for this great plugin

cannot handle svg file

for example:

![O(k)](https://wikimedia.org/api/rest_v1/media/math/render/svg/f5ec39041121b14e8c2b1a986c9b04547b223e3c)

O(k)

Extraction of links with valid () chars broken

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:

/\!\[(?<anchor>(.{0}|.+?))\]\((?<link>((http(s){0,1}).+?(\) {0,}|\)$|\)\n|\)\]|\)\[)))/g

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.

Similar images will generate the same MD5 file name

![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.

const baseName = md5(enc.decode(contentData.slice(0, 15000))).toString() ;

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
})()

paste-image-rename

здравствуйте
Скажите, вы не могли бы реализовать функционал плагина https://github.com/reorx/obsidian-paste-image-rename?
Дело в том что он не совместим с кириллицей, и просто отбрасывает кириллические символы
image
Автор плагина ни как не реагирует на сообщения на наличие проблемы

Re-Distribute attached files according to new rules

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

  • zzz/attachments, they would now be distributed to
  • zzz/attachments/notename

THANK YOU for your hard work!

It doesn't effect when pictures are “webp” format [bug]

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
image

It doesn't effect when pictures are “webp” format (copy more pictures become webp format)
image

image

"Remove all orphaned atachemnts" doesn't find any images

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

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}")) {

Global Override of Buffer.isBuffer in v0.15.9 Causes Conflict with Obsidian Git and Potentially Other Plugins

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.

[Feature request] Rename image based on .md file name

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.

The safety issue of running this command globally on all the notes

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.

[Feature request] Keep Download image use Markdown link not wikilink

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

Option to save everything that is not in the vault and not only online

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.

Typo in Plugin-Settings

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).

how to automatically remove the attachments when delete the corresponding notes.

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

Process content from local hard disk (originally located not in Vault) on copy-paste or drug-and-drop operations

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!

Privacy concern: why the upload?

When this plugin is active, pasting an image into Obsidian sends significant data to the net. Is this upload necessary? What is uploaded?

Error on slight format change.

![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.

about relative path definition

Thanks for this awesome plugin.
can the web download file path set to a more short way ?

this is the current way:
image

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

Links like file:////

Вопрос про плагин. Я на 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.

Bug report: Local images plus isn't processing images

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)

which command is for download images in current markdown note?

I am confused by the command 1 and 2 in blow image, what's the difference between of these two commands?

in addition, what if I just want to download images or media files for the current markdown note? which command should I chose?

image

best regards
Francis H

Unable to process gif file

I used sandbox warehouse testing.
Please check out my experimental video.

keycastow2.0.2.5_bsCYHb9cXT.mp4

Possible to keep external URL link even when downloading images to local computer?

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 🙂

only download but not replace automatically

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.