Welcome to the forum!
Can you add some info about what kind of output your are making with R Markdown and what sort of device you are using for your image (e.g., bmp, tiff)?
It can help people help you if you include a reproducible example (aka reprex), with data and code, that can reproduce the problem. You can read more about the elements of a reprex here: FAQ: What's a reproducible example (`reprex`) and how do I do one?
I think it can be a little tricky to give a reproducible example of R Markdown. Including the YAML header and any set-up chunk will be important along with at least one chunk that makes a plot that demonstrates the problem.