# Images on AWS missing from body of emails on iOS Mail app

**URL:** https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413
**Category:** Support
**Created:** [16.Декабрь.2018 13:15:35 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:** 8
**Page:** 2

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [07.Март.2019 16:45:02 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/21 "2019-03-07T16:45:02Z")

</div>

I don’t know where that code is, but we’re looking at the topic’s preview image (t.image\_url) and rendering it using `url_for_email(t.image_url)` like so:

> <https://github.com/discourse/discourse/blob/main/app/helpers/user_notifications_helper.rb#L105-L109>

Maybe iPhone Mail doesn’t like `<img src="//somewhere.com/image.png">`? Also I don’t see where that “baseballcap” text could be coming from…

---

<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: [07.Март.2019 17:04:22 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/22 "2019-03-07T17:04:22Z")

</div>

> [@neil](#):
>
> Maybe iPhone Mail doesn’t like `<img src="//somewhere.com/image.png">` ?

I think that’s the issue too

I’m guessing the URL to the image you use is held in `t.image_url` ?

I know the language I use here is wrong, but you’ll understand my logic 🙂

Could someone add a simple:

```plaintext
IF LEFT(t.image_url, 6) =! 'https:' THEN t.image_url = 'https:' & t.image_url 
```

🤔

And re:

> [@neil](#):
>
> Also I don’t see where that “baseballcap” text could be coming from…

That’ll be coming from here:

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

Please let me know if I can provide any more details? 👍🏻

---

<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: [07.Март.2019 21:03:26 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/23 "2019-03-07T21:03:26Z")

</div>

Why not simply change all your CDN urls to be `https://` vs `//` and then rebake everything.

---

<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: [07.Март.2019 21:20:18 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/24 "2019-03-07T21:20:18Z")

</div>

I [don’t have any](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/18) CDNs, @sam? 🤔

---

<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: [07.Март.2019 21:32:02 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/25 "2019-03-07T21:32:02Z")

</div>

I recommend adding one then, it will save you money anyway

---

<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: [07.Март.2019 21:36:44 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/26 "2019-03-07T21:36:44Z")

</div>

That seems a bit excessive when simply adding 6 characters to the URL (`https:`) could fix this issue for everyone 😕

---

<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: [07.Март.2019 21:49:42 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/27 "2019-03-07T21:49:42Z")

</div>

You can set the CDN url to your s3 base url and add the https there, it should work

---

<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: [20.Апрель.2022 03:56:09 UTC](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413/28 "2022-04-20T03:56:09Z")

</div>



[Предыдущая страница](https://meta.discourse.org/t/images-on-aws-missing-from-body-of-emails-on-ios-mail-app/104413.md?page=1)
