I\'m currently writing a document in markdown and I\'d like to make a reference to an image from my text.
this is my text, I want a reference to my image1 [h
Assuming that you want PDF output of Pandoc at the end:
The best solution for inserting images and changing their attributes I found is:
\begin{figure}[H]
\includegraphics[width=0.25\textwidth, height=!]{images/path.png}
\centering
\caption{mycaption}
\end{figure}
and in my template.latex
I have:
\usepackage{wrapfig}
\usepackage{float}
Other solutions cannot specify the image width or height, at least not in standard markdown. However it is often essential for something like a book or a paper to specify the dimensions of figures, except you want to configure output size of images before using them in your document. In that case you'd have to deal with different settings for those tools you use to create the images.
I recommend in case of Matplotlib to export to PDF and then use the code I posted. This will give the best image quality and highest flexibility in configuring what the image will look like in the output PDF, without having to worry about stuff.