Giter Site home page Giter Site logo

xryul / obsidian-image-converter Goto Github PK

View Code? Open in Web Editor NEW
114.0 3.0 11.0 573.38 MB

⚡️ Convert and compress images from one format to another by drag'n'dropping or pasting files into the note.

License: MIT License

JavaScript 45.91% TypeScript 50.59% CSS 3.50%
jpg png webp

obsidian-image-converter's People

Contributors

dotkt avatar xryul 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-image-converter's Issues

[FEATURE REQUEST] Resizing on Percentage (%)

It would be also a nice feature to input the resizing on percentage units by inputing a number followed with the percentage symbol (%) to perform a relative size resize.

Thanks for the nice plugin !

[QUESTION] Is there a way to include subfolder in the file location?

Hi,

Is there a way to include the subfolder in the name of the file for compatibility purposes? For examples, if I ask to put the file in the "images" subfolder, the file is stored there but the Markdown does not include the subfolder name. So if I open the file in a different app, the contnt is missing.

Thanks,

L

Resize does not support special characters in image file names

Plugin version 1.1.3

If the image file names contains special characters like german umlauts like "Bäume.jpg" and you create a link to the image e.g. "[[Bäume.jpg]]" resizeing the image with dragging the edges replace the image link with "[[B%C3%A4ume.jpg]]" and you get an error message like "B%C3%A4ume.jpg is not created yet".

Thank you for creating the helpfull plugin.

FR: add a switch to auto image converter

Hi, I have a some problem when I sync my note. The image converter plugin always auto image attachments files. It will mix the sync file like png and jpg files.
So could you add a function that it can switch to auto image converter.

Image resets to original size

Hi

I use the borders to scale the image in the page, it works initially but after that it resets back to the original size. I am not why that is the case.

I use it on Win 11, Obsidian 1.4.16

BUG: time format has 3 extra digits

  • System: Ubuntu 22
  • Obsidian version: v1.4.16
  • Image converter version: 1.1.6

When using auto rename, the generated file name has a suffix which is supposed to have the format YYYYMMDDHHMMSS, but I got three more digits. For example, in the file name my_note-2023-10-20231021102417842.jpg, "842" is the three extra digits. Is there a way to remove them?

Or even better: Is it possible to use regular expression to specify the format of the converted file name? Thanks a lot.

[FEATURE REQUEST] Keep the basename of the image

Hi,

Is it possible to use the basename of the image when renaming instead of using the name of the file? So if I paste (or drag and drop) this file

my_very_long_name.png

I would like it to be renamed as

my_very_long_name.webp

Thanks,

L

FR: Video support

Your plugin is great, sometimes I insert reference images from my mobile and they take up a lot of space. This is very practical.

It would be possible to do something similar with videos? (using ffmpeg for example)

[Bug] This plugin should not touch PDF thumbnails

Hi, thank you so much for this wonderful plugin - it lets me feel much easier when adding images to my vault because I don't have to worry about file sizes too much thanks to it!

One thing I noticed is that Image Converter also operates on PDF thumbnails, which I think is unexpected.

Screen.Recording.2024-02-18.at.23.33.11.mov

[FEATURE REQUEST] Optimize loading speed

Hi,

out of all my plugins image converter takes the most time to load up, and that's a larger issue on mobile than on desktop.
Could you please take a look and see if it's worth optimizing?
image

cheers!

Quick question: Could I ask about the release plan?

Hey,
Congratulations to all for the great project and progress.

I would like to know when you are planning to release all the latest advances in development.
I see lots of new additions to the code that are pending release.

Thank you again!

Conversion doesn't retain transparency.

Any images that have transparent backgrounds convert to white backgrounds with this plugin. This makes the plugin un-usable for my purposes. Everything else looks great though!
image

image

Plugin doesn't work in separate windows

If I select "Open in new window" for a given note, this plugin doesn't convert any images pasted into that window. Same is true of any tabs in that same separate window.

[BUG] Renamed filename has URI encode at the notification

Hello,
A very simple bug, the renamed filename has URI encode at the notification on the top right.

image

It can be noticed, the original filename has a space, and the renamed filename has %20.
The final filename is correctly set with the proper space, but the notification has this small error.

Regards,
Juan Pedro

PD: Great plugin.

Plugin version: 1.1.4
Obsidian version: 1.4.14
Edition Windows 11 Pro
Version 22H2
OS build 22621.2283
Experience Windows Feature Experience Pack 1000.22662.1000.0

BUG: Timestamp is always UTC

  • System: Ubuntu 22
  • Obsidian version: v1.4.16
  • Image converter version: 1.1.6

When using auto rename, the timestamp of the pasted image is always set to UTC time, regardless the actual timezone of the computer. In my case (UTC + 2), there is always an offset of two hours.

I set up the system time using the following command in order to cope with dual boot (Ubuntu 22 and Windows 10):

timedatectl set-local-rtc 1

BTW, the timestamp of another plugin obsidian-paste-image-rename works properly.

[BUG]: Custom image CSS tags get overwritten / removed when resizing

I have custom css tags for my images such as:

img[alt*="center"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

If I apply them to an image ([image.png|center]) and then resize with the image-converter resizing tool, they get removed. See the attached clip:
Screencast from 2024-01-09 20:25:53.webm

A temporary workaround is to first resize and then center.

[FEATURE REQUEST]: Make resize persistent in Reading Mode; Show right-click-context-menu on external images.

I just installed this plugin, and finally, it looked like Obsidian has a simple way to resize images. But at least on my Windows machine, I have some problems with it.

  1. I can resize with mouse drags, but the resizing doesn't persist. If I leave the page with the resized image on it and then return, the image is back to its original size
  2. The right click menu doesn't appear when I right click.

My settings are below. Any advice?

image

[FEATURE REQUEST] Converting existing images in vault

Feature request:
It would be great to add the possibility of converting existing images in the vault and replacing the links with the proper file name in the notes.

The converter works perfectly; however, a user's vault can already have a huge size due to existing image files stored in less effective formats like .png. It is relatively easy to convert all image files with a script; however, all notes that refer to the converted image need to be updated as well.
Thank you for this great plugin!

image links with path dont get modified on resize

When an image link has a path like:
![[../assets/where which.png]]
or
![[../assets/where which.png|300]] etc. ,
on resizing by dragging the edge of the image, or even when using Shift + Scrollwheel, the link (number part) doesnt get changed to reflect the new sizes.

But when using just the name of the image, it works fine, like:
![[where which.png]]
or
![[where which.png|300]] etc.

This issue does not exist when copy pasting an image into a note as the name in the link will just have the image's filename, but when manually entering a link with a chord like: ![[whe<Enter>, it gets changed to ![[../assets/where which.png]] with an entire filepath, by default, forcing me to manually remove the path so that resizing works.

[FEATURE REQUEST] Setting up and disabling automatic convertation

Thank you for your project, amazing job!

Please add:

  • the ability to disable automatic convert and add certain directory to exceptions
  • the ability to disable automatic image conversion completely and add certain folders to exceptions
  • ability to add some types of files to exceptions. For example, so that gif files can be optimized, but not converted to webp or another format

Link in note doesn't match sublocation folder

My setup is configured like this:

Output in subfolder

Subfolder name: /images

When I paste the images (or drag them) they are put in the correct folder, but the link says

instead of

[FR] Default maximum image size (non-destructive)

Hello,
Great plugin. Thank you for refreshing the previous plugin by musug.

I would like to propose a feature, where the images have a maximum image size (horizontal) of X. In a non-destructive way.

My use case:
I tend to copy and paste lots of images into my Obsidian.
I don't want to reduce the size of the images.
But I don't want the images to take all the note space.

My proposal:
Instead of having to resize (non-destructive) each image individually, the plugin could check the image size and if it's bigger than X, apply an image size.
Using ![[Pasted image 20230924161352.jpg|1000]] the |.
Like "Image resize mode", but non-destructive.

Thank you for your consideration.

Embed size support for Excalidraw

example

original
! [[Drawing 2024-01-18 13.27.33.excalidraw]]
Complete the resizing
! [[Drawing 2024-01-18 13.27.33.excalidraw|200]]

[Improvement] Cursor after pasting image is behind image

First of all, thanks for this amazing plugin.
Thanks to the compression, my images are now only a third its size.
And being able to specify a default size is also something that I greatly appreciate (its how I found this plugin at first :D).

Anyway, there is a small inconvenience.
After pasting an image the cursor is now behind the image link.
Which means I have to move my cursor again to the front to continue writing.

Nothing big, but it would improve my quality of life a little bit, if it were possible to fix that. : )

Thanks for your work

Video to demonstrate the inconvenience:

Inconvenience.demonstration.mp4

Way to Turn Off right click menu

The right click menu is fighting with other plugins for the right click window space :(
The plugin in the back is Second Window and is much more important for my workflow.
Is it possible to have a way to turn the right click menu off perhaps?

image

Feature request: Resize with ALT+Scrollwheel

Most of the time Shift + Scollwheel for page sidescrolling.
The difficulty occurs when images are stretched along the horizontal axis, so if u want to sidescroll u need to hover with the mouse over an empty canvas space.
Can be tricky not to hit the scale-shift-scroll event when there are some images stacked.

If its possible a toggle between Alt and Shift would be great!

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.