hunyadi / md2conf

Publish Markdown files to Confluence wiki
MIT License
56 stars 30 forks source link

Resize image #74

Open kpallade opened 4 days ago

kpallade commented 4 days ago

Hello,

I'm trying to resize an images but I don't find the right way to do it.

What I've tried in my markdown file:

![Google Logo](google_logo.png){ height=20% }
<img src="google_logo.png" alt="Google Logo" height="50" />

In any case, the image appears in Confluence (I've uploaded it manually), but it is not resized.

Many thanks for your help

hunyadi commented 4 days ago

md2conf uses Python-Markdown for converting Markdown to HTML (or, to be more precise, Confluence Storage Format, which is a variant of XHTML). Does Python-Markdown understand the seemingly non-standard syntax with the image height set in curly braces?

The ac:image macro to embed an attached or external image has attributes ac:height and ac:width. (We already use ac:align.) We could populate these attributes based on attributes the source image has.

hunyadi commented 4 days ago

Linking to images hosted externally via a full URL is now possible with either of the following syntaxes:

![External image](http://confluence.atlassian.com/images/logo/confluence_48_trans.png)

<img src="http://confluence.atlassian.com/images/logo/confluence_48_trans.png" width="24" height="24" />

The latter syntax allows you to specify image size.

kpallade commented 4 days ago

I will try it, thank you very much :)