# iOS 邮件应用中 AWS 图片缺失

**URL:** <https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413>\
**Category:** Support\
**Created:** [2018年十二月16日 13:15 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413 "2018-12-16T13:15:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2018年十二月16日 13:15 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/1 "2018-12-16T13:15:35Z")

</div>

Hi everyone,

Not sure if this is a bug or a configuration issue. However, I’m quite sure this has only happened recently, I’m sure I’d have noticed before now otherwise 😊

All our images are hosted on AWS.

We are running Discourse v2.2.2.beta6+5

When an email notification arrives that contains an embedded image on Amazon AWS, the image itself is missing / not displaying.

This issue may be of a similar theme / issue to [Missing logo in email summary](https://meta.discourse.org/t/missing-logo-in-email-summary/103510) ? (Which we also suffered with, and was subsequently fixed, thanks!)

Here’s a screen shot of how the email(s) look when viewed in the Mail app on iOS devices:

 ![PNG](https://global.discourse-cdn.com/meta/original/3X/5/2/5293f076f69369f932ab96040ab6627a71b990b4.jpeg)

The image links to //greyarrows.s3.dualstack.eu-west-2.amazonaws.com/original/2X/3/37430494c198530c000587d93a8fd05ebfdd97f3.jpeg

If I put `https:` in front of the link and open it in a new private browser window, the image does seem to load ok: [https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/original/2X/3/37430494c198530c000587d93a8fd05ebfdd97f3.jpeg](https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/original/2X/3/37430494c198530c000587d93a8fd05ebfdd97f3.jpeg)

Is this a bug? Or have I possibly missed some kind of config setting on AWS and simply not noticed this issue before? 🤔

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2018年十二月16日 13:18 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/2 "2018-12-16T13:18:50Z")

</div>

Although, when viewed in Gmail on Firefox on my desktop PC, the image appears perfectly:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/7/47e4c5d9fd3c650e36a2d15124763584c48b51b4.jpeg)

Which makes me think this may just be an iOS thing…? 🤔

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2018年十二月16日 13:27 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/3 "2018-12-16T13:27:09Z")

</div>

Although here’s an older email that does display the image:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/4/74be51f44082d5fed244138d9368bbe6fadc3630.jpeg)

So I’m not sure now…

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2018年十二月16日 13:33 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/4 "2018-12-16T13:33:54Z")

</div>

Seemed to work in emails I received in October, but sadly I don’t subscribe to many threads for email notifications.

Anyone else experienced this issue?

---

<div class="post-metadata">

**Author:** ![chumstick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chumstick/32/122383_2.png) [@chumstick](https://meta.discourse.org/u/chumstick)\
**Post date:** [2018年十二月17日 03:21 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/5 "2018-12-17T03:21:58Z")

</div>

It’s a [known bug](https://meta.discourse.org/t/digest-logo-not-working/103255) of the digest logo. Looks nearly identical in cause though, the malformed URLs when hosted in S3.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年十二月17日 03:39 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/6 "2018-12-17T03:39:37Z")

</div>

Per the linked topic, this bug was fixed though, so patch to latest if you haven’t already.

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2018年十二月17日 07:48 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/7 "2018-12-17T07:48:56Z")

</div>

Hi @chumstick and @codinghorror

As per my first post, I’m already running Discourse v2.2.2.beta6+5 which did indeed fix the digest logo bug 👍🏻

@chumstick is the same problem that caused the logo issue recently also affecting S3 images in the body of the email too?

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2018年十二月18日 16:30 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/8 "2018-12-18T16:30:03Z")

</div>

Here’s one from yesterday that also doesnt display the image:

 ![IMG_1357](https://global.discourse-cdn.com/meta/original/3X/f/6/f6173783e48eab80eea23b4a1998423a9ff17140.jpeg)

The link that’s presented doesn’t include https: at the start, will this be an issue?

 ![IMG_1358](https://global.discourse-cdn.com/meta/original/3X/3/0/309376f8f713da554bc916b0bf1491182aa4b7e1.jpeg)

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2018年十二月18日 16:32 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/9 "2018-12-18T16:32:15Z")

</div>

Another observation, images in the daily summary emails _do_ actually appear 🤔

Are emails with single notifications + an image handled differently somehow?

 ![IMG_1370](https://global.discourse-cdn.com/meta/original/3X/6/3/63ea3024ee16d7059296eab838d73247f78cf2d0.jpeg)

 ![IMG_1371](https://global.discourse-cdn.com/meta/original/3X/a/c/ac938cf0a2d7a855a7b161fef4570f5a7a74c715.jpeg)

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2019年一月9日 18:32 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/10 "2019-01-09T18:32:51Z")

</div>

Just wondering if anybody has any suggestions on a fix or work around for images in posts not appearing within the email notifications?

To confirm, it only occurs when using the built in / default Mail app on iOS. This issue presents itself on iOS 10 and iOS 12 (I don’t have an 11 device).

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2019年二月20日 13:08 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/11 "2019-02-20T13:08:28Z")

</div>

All of our notification emails that reference images uploaded to our AWS still fail to display when viewed using the Mail app built in to iOS.

The daily summary emails display the images fine - which I don’t understand. They must be embedded or referenced differently somehow.

Here’s what all iOS users see:

 ![PNG](https://global.discourse-cdn.com/meta/original/3X/8/d/8d76fda0bcce5c5c244653c669411d87c8047abc.jpeg)

As a test, I’d like to add `https:` to the start of the image src url as I think this may solve the problem:

 ![IMG_0633](https://global.discourse-cdn.com/meta/original/3X/c/e/cecbb6a6c978ada0698be2e07c12d643861e16c8.png)

Does anyone know how I could do that? 🤔

Would adding `https:` to the img src url cause issues elsewhere?

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2019年三月3日 19:36 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/12 "2019-03-03T19:36:00Z")

</div>

I think my theory of the `https:` missing from the image URL may be correct.

I received an email notification from meta today, and it included an image:

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/3/8310fa2287866d9e4d77350d2d99a38232a2a965.jpeg)

As you can see, that image displayed perfectly in the iOS mail app.

Looking at the URL of the image itself, it DOES include `https:` at the start:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/6/16f87f8e4762e8d4abf79c6ca4d41570ec5fb701.jpeg)

I realise that the image in that email is hosted on fastly rather than AWS, but why does meta put https in the image URL and my instance does not?

🤔

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2019年三月3日 20:31 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/13 "2019-03-03T20:31:18Z")

</div>

Does your site have force\_https enabled?

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年三月3日 20:36 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/14 "2019-03-03T20:36:42Z")

</div>

I wonder @codinghorror if we should default force https in production now, it pops up enough, and non https sites should be a rarity

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2019年三月3日 20:38 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/15 "2019-03-03T20:38:52Z")

</div>

There are lots of situations where Let’s Encrypt can fail, but if enrolment succeeds in a [standard install](https://meta.discourse.org/t/142537?silent=true) I would be all for it.

We can detect if 443 is exposed, the SSL/LE templates are in place and the certbot result, right?

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2019年三月3日 21:37 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/16 "2019-03-03T21:37:42Z")

</div>

> [@Stephen](#):
>
> Does your site have force\_https enabled?

Hi @Stephen - yes, it’s been on from day one:

 ![22](https://global.discourse-cdn.com/meta/original/3X/8/a/8a671e63ab5ef2f43187b7bdbadef065957b5cef.png)

Curious as to why meta puts `https` in the image url of the email notifications and my discourse (v2.3.0.beta3) does not? 🤔

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年三月3日 21:54 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/17 "2019-03-03T21:54:24Z")

</div>

Are you using a CDN? If so what is your CDN URL?

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2019年三月4日 07:15 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/18 "2019-03-04T07:15:31Z")

</div>

Hi @sam there is no CDN in use on my instance:

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/6/361725436e927d70db0282ad3bcc270c9199143c.jpeg)

---

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2019年三月6日 08:48 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/19 "2019-03-06T08:48:18Z")

</div>

I’m seeing this issue in the daily summary emails sometimes too:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/7/c77dc8236b3c145f025314902d34d3ff509c5cc9.png)

And again, when looking at the URL of the image there is no `https:` in there either:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/6/76b36d412136e36364785f570ecd121a40e48fec.jpeg)

I still don’t know if this is the cause and until I can find a way to add `https:` to the image url I don’t know how else to rule this out.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年三月7日 01:11 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/20 "2019-03-07T01:11:33Z")

</div>

hmmm maybe the codepath the omits images from ultra short emails is accidentally being triggered for digests, is that possible @neil?

[下一頁](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413.md?page=2)
