# 预览中的图片调整大小链接在图片本身为热链接时无效

**URL:** https://meta.discourse.org/t/image-resize-links-in-preview-dont-work-when-the-image-itself-is-a-hotlink/157711
**Category:** Bug
**Created:** [2020 年7 月 14 日 15:21 UTC](https://meta.discourse.org/t/image-resize-links-in-preview-dont-work-when-the-image-itself-is-a-hotlink/157711 "2020-07-14T15:21:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### 作者： ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### 发布日期： [2020 年7 月 14 日 15:21 UTC](https://meta.discourse.org/t/image-resize-links-in-preview-dont-work-when-the-image-itself-is-a-hotlink/157711/1 "2020-07-14T15:21:50Z")

</div>

当使用热链接图片（如下例所示）时，编辑器中的“调整图片大小”按钮会跳转到链接目标，而不是执行调整大小操作：

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/4/04f965b8ba2d01048b88972aebd1e5a130c15051.jpeg)

* * *

示例：

```plaintext
[![image|434x434](upload://xCJJt9wdHs2FmTEth203uwIQAvd.jpeg)](https://en.wikipedia.org/wiki/Wormhole)

```

[![image](https://global.discourse-cdn.com/meta/original/3X/e/b/eba8bdec992dedb3aaf68350af75e05a57568b3f.jpeg)](https://en.wikipedia.org/wiki/Wormhole)

---

<div class="post-metadata">

### 作者： ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### 发布日期： [2020 年7 月 15 日 04:07 UTC](https://meta.discourse.org/t/image-resize-links-in-preview-dont-work-when-the-image-itself-is-a-hotlink/157711/4 "2020-07-15T04:07:23Z")

</div>

> <https://github.com/discourse/discourse/commit/0058a15266ac959308541e7bfbc3a932615e8b68>
>
> Currently in composer preview, if the image scale buttons are inside a \`\<a\>\` lin…k then it redirects to the \`href\` location after the image scaling task.

上述提交已修复此问题。

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2020 年7 月 15 日 04:14 UTC](https://meta.discourse.org/t/image-resize-links-in-preview-dont-work-when-the-image-itself-is-a-hotlink/157711/5 "2020-07-15T04:14:17Z")

</div>


