# Our discourse Images are not lightboxed

**URL:** https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004
**Category:** Support
**Created:** [27 maart 2018 om 23:47 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004 "2018-03-27T23:47:09Z")
**Posts on this page:** 15
**Page:** 2

<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: [4 juli 2020 om 20:33 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/22 "2020-07-04T20:33:57Z")

</div>

> [@Michael\_Uray](#):
>
> I renamed the app.yml with `domain.name.yml` and this caused docker to change the DNS name of `domain.name` to its internal IP address. I renamed it to `domain_name.yml` and everything is working fine now.

I agree, can launcher be modified to warn about this or block it next week @falco?

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [6 juli 2020 om 17:05 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/23 "2020-07-06T17:05:04Z")

</div>

> [@Michael\_Uray](#):
>
> **Edit:** I found out, that I renamed the app.yml with domain.name.yml and this caused docker to change the DNS name of domain.name to its internal IP address. I renamed it to domain\_name.yml and everything is working fine now.

i am having the same issue, can you clarify exactly what you need to rename the .yml file to.

Do you need to include the TLD and subdomain as part of yml file. For this site would it be `meta.discourse.org.yml`

---

<div class="post-metadata">

### Author: ![Michael\_Uray](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael_uray/32/183119_2.png) [@Michael\_Uray](https://meta.discourse.org/u/Michael_Uray)
#### Post date: [6 juli 2020 om 17:37 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/24 "2020-07-06T17:37:20Z")

</div>

> [@eherman](#):
>
> meta.discourse.org.yml

Rename it to `meta_discourse_org.yml`.

---

<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: [6 juli 2020 om 17:50 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/25 "2020-07-06T17:50:43Z")

</div>

The only `.` in your file name should precede the extension.

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [6 juli 2020 om 22:56 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/26 "2020-07-06T22:56:50Z")

</div>

Thanks for clarifying. I changed the filename and rebuilt but I am still not seeing any lightbox or hover to show the caption on any images.

> [@Michael\_Uray](#):
>
> It shows me an error in the log file, that it cannot access `/uploads/....`

Which log file is this? I am trying to confirm if this is the same issue.

I also have `Force your site to use HTTPS only` on and port 80 blocked on the firewall.

---

<div class="post-metadata">

### Author: ![Michael\_Uray](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael_uray/32/183119_2.png) [@Michael\_Uray](https://meta.discourse.org/u/Michael_Uray)
#### Post date: [6 juli 2020 om 23:12 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/27 "2020-07-06T23:12:53Z")

</div>

> [@eherman](#):
>
> Which log file is this?

```plaintext
cd /var/discourse
./launcher enter app
tail -f /shared/log/rails/production.log

```

See also this article regarding Discourse logs.

> [@Where does Discourse store and show logs?](https://meta.discourse.org/t/where-does-discourse-store-and-show-logs/58022):
>
> When troubleshooting issues or errors with Discourse it is important you look at your logs. Here’s a listing of where they are and what’s in there. Your site domain Administration logs shown in the UI The Discourse admin panel contains several forms of logging: Emails that are sent, skipped, bounced, received and rejected are logged at https://=DOMAIN=/admin/email-logs and the neighboring tabs. Staff actions are logged at https://=DOMAIN=/admin/logs/staff\_action\_logs Email addresses an…

If this happens only to the existing posts, but the new posted images are fine, then it helped to me to run

```plaintext
rake uploads:recover_from_tombstone
rake posts:rebake

```

Please see also there.

> [@Old image uploads become broken images](https://meta.discourse.org/t/old-image-uploads-become-broken-images/47236/2):
>
> Lest anyone thinks that this query went unanswered, many thanks to @zogstrip for solving this. It seems that Discourse got confused about whether those uploaded images were being used and moved them for subsequent deletion. Though you will probably never need it, the fix went something like this: # copy the "deleted" images from their to-be-deleted staging area cd /var/discourse ./launcher enter app rake uploads:recover\_from\_tombstone # rebake to see that it doesn't happen again rake posts:re…

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [7 juli 2020 om 08:33 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/28 "2020-07-07T08:33:59Z")

</div>

All really useful thank you.

It looks like i am having the same issue with the error `can't reach '/uploads/default...`

The next line of my log file is  
`Started GET "/posts/950" for 127.0.0.1 at 2020-07-07 08:24:05 +0000`

Any ideas why mine is trying through the loopback IP and not the newly named container or the container local IP ?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [8 juli 2020 om 04:44 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/29 "2020-07-08T04:44:44Z")

</div>

> [@codinghorror](#):
>
> I agree, can launcher be modified to warn about this or block it next week

This appears to be specific to non-standard installs that simultaneously:

- Didn’t use `./discourse-setup` and created a yml file manually

- Are using a reverse proxy

- This reverse proxy is magically configured using a docker container name

I’d advise against changing the current deterministic container name for everyone to address this corner case, unless it can also happens by simply adding an extra dot to the yml file name.

---

<div class="post-metadata">

### Author: ![Michael\_Uray](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael_uray/32/183119_2.png) [@Michael\_Uray](https://meta.discourse.org/u/Michael_Uray)
#### Post date: [8 juli 2020 om 06:42 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/30 "2020-07-08T06:42:03Z")

</div>

> [@Falco](#):
>
> Didn’t use `./discourse-setup` and created a yml file manually

I actually did use it, but renamed the file later since a have two Discourse instances running and otherwise both would be called app in the same Docker instance.  
Thought it is reasonable to renable the file like the used domain.

> [@Falco](#):
>
> Are using a reverse proxy

Probably pretty common for smaller communities to run multiple sites on one server.

> [@Falco](#):
>
> This reverse proxy is magically configured using a docker container name

It was not the reverse proxy which caused the name issue. It was Docker itself since it automatically adds the container name to its internal DNS. The problem was, that the Discourse container name in Docker was the same name as its external DNS name (eg. `app.yml` → `meta.discourse.org.yml`).

I propose to show at least a strong warning if the file name matches the given domain name in the .yml file.

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [14 juli 2020 om 11:52 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/31 "2020-07-14T11:52:30Z")

</div>

Im still having the same issue with not being able to reach the image to get the dimensions.

> Can’t reach ‘/uploads/default/original/1X/9385b0977b09b0f2239c287de980b6fc238d0da0.png’ to get its dimension.

This is with a completely [standard install](https://meta.discourse.org/t/142537?silent=true) using `./discourse-setup`

Any other ideas on how to fix this?

---

<div class="post-metadata">

### Author: ![Michael\_Uray](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael_uray/32/183119_2.png) [@Michael\_Uray](https://meta.discourse.org/u/Michael_Uray)
#### Post date: [15 juli 2020 om 23:22 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/32 "2020-07-15T23:22:24Z")

</div>

What happens if you try to download the image inside your Discourse app?

```plaintext
./launcher enter app

```

```plaintext
wget https://yourdomain.com/uploads/default/original/1X/9385b0977b09b0f2239c287de980b6fc238d0da0.png

```

Does the name resolution point to the correct IP address?

```plaintext
apt-get update
apt-get install inetutils-ping
ping yourdiscoursedomain.com

```

or

```plaintext
apt-get update
apt-get install dnsutils
nslookup yourdiscoursedomain.com
```

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [16 juli 2020 om 14:14 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/33 "2020-07-16T14:14:10Z")

</div>

Thanks again for your help Michael, it is much appreciated.

I can ping the domain successfully but it looks like the `wget` is trying to go through a web proxy.

I have followed [this](https://medium.com/@airman604/getting-docker-to-work-with-a-proxy-server-fadec841194e) guide and added the `no-proxy` variable in all the relevant places.

Am i missing something ? How do i configure the container to not use the web proxy the server is using. Do i need to add a no proxy to app.yml ?

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [20 juli 2020 om 13:38 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/34 "2020-07-20T13:38:11Z")

</div>

i added my domian to the `no-proxy` parameter in the app.yml file and rebuilt and this now ignores the proxy as required.

I am still getting errors when doing a wget from within the app

> WARNING: The certificate of ‘[MYDOMAIN.com](http://MYDOMAIN.com)’ is not trusted.  
> WARNING: The certificate of ‘[MYDOMAIN.com](http://MYDOMAIN.com)’ doesn’t have a known issuer.

This is because my SSL cert is from an internal CA. When i run the same `wget` command with the flag `--no-check-certificate` it works fine.

How can i either add the cert to be trusted or add the flag to not check.

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [27 juli 2020 om 15:34 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/35 "2020-07-27T15:34:59Z")

</div>

@Michael_Uray do you know where i need to add the root CA to allow the discourse container to trust the SSL cert.

I have followed [this](https://www.techrepublic.com/article/how-to-install-ca-certificates-in-ubuntu-server/) guide however i think this applies to the server itself and not the container running discourse.

---

<div class="post-metadata">

### Author: ![Michael\_Uray](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael_uray/32/183119_2.png) [@Michael\_Uray](https://meta.discourse.org/u/Michael_Uray)
#### Post date: [28 juli 2020 om 07:07 UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/36 "2020-07-28T07:07:59Z")

</div>

> [@Michael\_Uray](#):
>
> `./launcher enter app`

You have to go for sure inside the container and add it there if you don’t use a reverse proxy, but I think it will not be persistent on this way. I guess you have to add it somehow to the app.yml or to make the according CA path within the container persistent somehow via the app.yml.

[Vorige pagina](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004.md?page=1)
