blogdown 不自动缩放图像 - 在 iOS 上查看时它们会中途被截断

blogdown not autoscaling images - they get cut off midway when viewed on iOS

---
title: "Title"
date: 2019-01-01
categories: ["TBD"]
tags: ["TBD"]
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE)
```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.

[编辑] 我把它放在我所有 *.Rmd 文档的开头,问题就解决了:

```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE, out.width = "100%")
```

我 运行 我的 blogdown 网站上的代码块是通过 Netlify 托管的。当我在桌面浏览器上查看它时,一切看起来都很好。当我在 iPhone 上查看时,绘图不会自动缩放并被截断。

下面的图片 #1 是我的 iPhone 肖像模式。如果我将我的 iPhone 旋转到横向模式(图片 #2),我会得到更多的水平分辨率并且图表的整个宽度都是可见的。

有没有办法让 blogdown 自动缩放图像,这样无论浏览器的分辨率如何,它们都能正常工作。我已经在 iOS Safari/Chrome/Firefox 上测试过,所有浏览器都有这个问题。

在通过 update.packages(ask = FALSE, checkBuilt = TRUE)tinytex::tlmgr_update().

提出这个问题之前,我也已经执行了 Yihui 规则 #1 并更新了我的所有包

图片 1 - iPhone人像模式


图片 2 - iPhone 横向模式


默认情况下,绘图的大小具有固定的像素宽度。您可以在 knitr 选项中指定 out.width = "90%" 以获得响应大小。
然而,即使是像素,我也不会在小屏幕上遇到这个问题。那么,我想这可能与你使用的主题有关。不过不确定。