I’m using Weave.jl to write up a report using .jmd format. I need to include some images that I’ve already generated, so I included them in my markdown as I normally would:

And it looks fine in the HTML export, but in the PDF it is way too large and has some text on the top. Here’s how it looks in my PDF viewer. Notice that it is not centered and the right part is cut off (it’s an 800px by 800px square image).
Additionally is there a way in Weave to add a caption and figure reference to an image? I guess I could try loading it in a code block with FileIO rather than using markdown syntax, but that seems pretty roundabout and also I don’t see an easy way to load SVG files to get displayed.
The easiest option is to use the pandoc output format and convert it to pdf, you can then use pandoc image attributes Pandoc - Pandoc User’s Guide and e.g. pandoc-crossref for figures.