obsidian-image-converter icon indicating copy to clipboard operation
obsidian-image-converter copied to clipboard

[FEATURE REQUEST] Add an option to set a default value for image alignment

Open charmeee opened this issue 11 months ago • 2 comments

Hello! I love this great plugin. I always use drag resizing and right-click menu.

I was wondering if you could please add an option to set a default value for image alignment. I usually use center align so i want to set default align to center.

charmeee avatar Dec 20 '24 21:12 charmeee

+1

Haozon avatar Mar 24 '25 07:03 Haozon

I want to add that this can be (mostly) accomplished right now with a CSS snippet:

/* align all images to the center */
img:not(.emoji) {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* do the same to the image-resize-container that appears when you hover over an image with converter enabled */
.image-resize-container {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

it's not as elegant a solution as the above would be, but it works, and it does still respect manually setting left/right alignment via the plugin. (adapted from Cecilia May's snippet)

Edit: This also seems to affect tables. Not immediately sure why.

samawelch avatar Apr 23 '25 05:04 samawelch