Knitr / jekyll / servr :: jekyll images are huge or do not have good resolution

This is my first post for SO, and I hope my question will be specific enough.

I wrote a blog post using servr::jekyll()[Thanks, Yihui], but the images are not correct on the blog - they are huge! When I do not specify the size of the image, the images appear a little vague in the mail. I used this code in my message settings block:

knitr::opts_chunk$set(
    echo    = TRUE,
    warning = FALSE,
    error   = FALSE,
    message = FALSE,
    device  = 'png',
    fig.width = 6,
    fig.height = 6,
    dpi = 300
)

The blog post is here , and the repository is here .

So I want the images to be the same width as the text and have a good resolution. Any help is much appreciated!

Please let me know if you need more information.

+4
1

, , max-with img CSS, .

img {
  max-width: 100%;
}

, , . svg png ( svglite svglite).

+2

Source: https://habr.com/ru/post/1615677/


All Articles