# 如何正确显示非常高的图片？

**URL:** <https://meta.discourse.org/t/how-to-display-a-very-tall-image-properly/187425>\
**Category:** Support\
**Created:** [2021年四月20日 01:33 UTC](https://meta.discourse.org/t/how-to-display-a-very-tall-image-properly/187425 "2021-04-20T01:33:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)\
**Post date:** [2021年四月20日 01:33 UTC](https://meta.discourse.org/t/how-to-display-a-very-tall-image-properly/187425/1 "2021-04-20T01:33:05Z")

</div>

假设我想上传一张图片，例如：

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/9/d9aada40f2e4927b10c4f44c1d5f24618482e959.png)

即使点击图片，也很难看清内容。有没有办法让图片放大以适应屏幕宽度？

我运营的是一个粉丝论坛，因此禁用了右键点击操作以防止下载图片，这样用户也无法在新标签页中查看图片。

---

<div class="post-metadata">

**Author:** ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)\
**Post date:** [2021年四月20日 11:29 UTC](https://meta.discourse.org/t/how-to-display-a-very-tall-image-properly/187425/2 "2021-04-20T11:29:05Z")

</div>

您可以检查“最大图片高度”设置，并将其值设为最大值（2000000000），我相信在重新构建帖子 HTML 后这将解决问题。

如果您没有灯箱功能，可以尝试一些 CSS，类似下面的代码可能有效：

```css
#reply-control .d-editor-preview img:not(.thumbnail):not(.ytp-thumbnail-image), .cooked img:not(.thumbnail):not(.ytp-thumbnail-image) {
    max-width: 670px;
    max-height: 2000000px;
}

```

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2021年五月20日 11:29 UTC](https://meta.discourse.org/t/how-to-display-a-very-tall-image-properly/187425/3 "2021-05-20T11:29:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
