xRyul / obsidian-image-converter

⚡️ Convert and compress images from one format to another by drag'n'dropping or pasting files into the note.
MIT License
111 stars 11 forks source link

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

Open MaxWolf-01 opened 4 months ago

MaxWolf-01 commented 4 months ago

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.

strongMuscle110 commented 3 months ago

Image anchor tags get removed/overwritten after resizing

  1. adding tag ![[filename.png#invert_B|500]]

  2. resizing img ![[filename.png|525|]]