# Our discourse Images are not lightboxed

**URL:** https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004
**Category:** Support
**Created:** [March 27, 2018, 11:47pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004 "2018-03-27T23:47:09Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pyo0723](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pyo0723](https://meta.discourse.org/u/pyo0723)
#### Post date: [March 27, 2018, 11:47pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/1 "2018-03-27T23:47:09Z")

</div>

Could someone help me to get the image lightboxing working.

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/5/e530b57d23b9afb57a91cca0e62606d6c20a1c4d.jpg)

I uploaded a image. image resolution is 1772 x 2362.

But Images are without thumbnails and without lightboxes.

I checked create thumbnails option.

Settings part: File \> create thumbnails

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

  

My Discourse is on private network. But we opened the firewall to connect from the outside.  
Version is v2.0.0.beta5+12.

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

What is the problem?

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [March 27, 2018, 11:48pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/2 "2018-03-27T23:48:16Z")

</div>

Possibly related:

> [@Lightbox not showing up on uploaded images after update](https://meta.discourse.org/t/lightbox-not-showing-up-on-uploaded-images-after-update/73009/9):
>
> Thanks for the suggestion. Safe-mode did not work out, Lightbox is still not working. We indeed have a outer nginx-proxy that is forwarding HTTPS-traffic to the nginx located within the discourse-container (also configured for https). Could that be an issue? If yes, what could be the deal? server { listen 443 ssl http2; server\_name ###mydomain####; client\_header\_timeout 5; #client\_body\_timeout 15; client\_max\_body\_size 300m; include /opt/nginx/conf/ssl.params; pro…

---

<div class="post-metadata">

### Author: ![pyo0723](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pyo0723](https://meta.discourse.org/u/pyo0723)
#### Post date: [March 28, 2018, 10:01am UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/3 "2018-03-28T10:01:03Z")

</div>

Thank you for your reply.

I updated today to latest revision and already up to date.

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

and I tried [safe mode](https://meta.discourse.org/t/53504?silent=true).

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/6/364fc72b32d1a2b033d3f904a3d0b7515845d02c.png)

but lightbox is not appearing no matter how I get the picture/image into the Post.

What shoud I do??

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [March 28, 2018, 10:25am UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/4 "2018-03-28T10:25:07Z")

</div>

No problem. I wish I could help you more, but unfortunately, I do not have enough knowledge on the subject. Hopefully someone that knows more will respond soon. I would also watch the topic that I linked to. It might eventually have a solution posted.

In the mean time, you might want to take a look at your logs and see if there are similarities to the logs posted in that topic. I’m pretty sure the logs you would be interested in can be found by adding `/logs` to your forum’s base URL. So it would look something like `https://example.com/logs` The user in that topic also mentions a proxy. Are you using a proxy?

If you can provide this type of information, it should be helpful to someone that reads this topic and has a better understanding on the subject.

I wish you luck in solving the problem!

---

<div class="post-metadata">

### Author: ![pyo0723](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pyo0723](https://meta.discourse.org/u/pyo0723)
#### Post date: [March 30, 2018, 3:29am UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/5 "2018-03-30T03:29:40Z")

</div>

thank you tshenry.

our discourse is not using proxy and https.

I still do not know the cause of the problem. 😰

Thank you. ^^

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [March 30, 2018, 3:50pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/6 "2018-03-30T15:50:17Z")

</div>

First thing first. If possible, upload that image to meta here. See if it works.

If it doesn’t work in meta, then it is much easier for the team to fix as there is their repo right here.

If it works in meta but not on your site, then there must be a setting conflict somewhere.

I can see that the image in your original post successfully lightboxes.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [March 30, 2018, 3:59pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/7 "2018-03-30T15:59:38Z")

</div>

> [@schungx](#):
>
> First thing first. If possible, upload that image to meta here.

We’d prefer if you could upload to try first ([try.discourse.org](http://try.discourse.org)), that way we don’t start getting image uploads all over the place. _If_ the image fails to lightbox on try, then feel free to upload it here so the example doesn’t get deleted when try is reset each day. If the image lightboxes on try then the issue is specific to your configuration as @schungx stated.

---

<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: [June 5, 2020, 10:07pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/8 "2020-06-05T22:07:22Z")

</div>

I have the version 2.5.0.beta6 running and I experience the same issue.  
“create thumbnails” is active, but it does not create a lightbox, independent of the size of the picture.

I have a second instance of discourse which is a couple month old and there I have old posts where the lightbox works, but not on the new posts.  
Maybe an issue with an update?

If I upload the same picture to [try.discourse.org](http://try.discourse.org), then it works there fine with the lightbox.

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [June 5, 2020, 11:08pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/9 "2020-06-05T23:08:32Z")

</div>

Hey and welcome to Meta @Michael_Uray 👋

> [@Michael\_Uray](#):
>
> If I upload the same picture to [try.discourse.org](http://try.discourse.org), then it works there fine with the lightbox.

This suggests there’s an issue in your setup somewhere. Can you please check your browser console for errors or post a link to the site you’re having trouble with?

---

<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: [June 6, 2020, 7:56am UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/10 "2020-06-06T07:56:45Z")

</div>

I just created there a test thread on a new discourse instance which I did setup last week.  
The image is 1920x1050, but it does not open in a lightbox.  
[https://dis.ctb.co.at/t/test-image-lightbox/44](https://dis.ctb.co.at/t/test-image-lightbox/44)

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [June 7, 2020, 7:56am UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/11 "2020-06-07T07:56:11Z")

</div>

Thanks for the link Michael 👍

I’m not seeing any JavaScript errors on that page. Can you please check if there are any issues in Sidekiq?

`your.site.com/sidekiq`

Specifically, these tabs

 ![Sidekiq queues](https://global.discourse-cdn.com/meta/original/3X/1/2/122159f6e96839a8c90a5d1b29de43206edc9821.png)

Also, can you please confirm that you’ve followed the [official guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) when you set up your site?

---

<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: [June 7, 2020, 2:14pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/12 "2020-06-07T14:14:36Z")

</div>

No issues so far as I can see.  
 ![2020-06-07_16-07-18_Sidekiq_-_Mozilla_Firefox](https://global.discourse-cdn.com/meta/original/3X/1/c/1c38298c54c76999b8f61c92e1d210fd1d2ab764.png)

> [@Johani](#):
>
> Also, can you please confirm that you’ve followed the [official guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) when you set up your site?

I actually followed this guide, but I changed the path and adapted these changes in the app.yml file.

```
volumes:
  - volume:
      host: /var/docker/dis.ctb.co.at/shared/standalone
      guest: /shared
  - volume:
      host: /var/docker/dis.ctb.co.at/shared/standalone/log/var-log
      guest: /var/log

```

On the second installation on which the lightbox was working before was the path at first “/var/docker” and I changed it later to another location.  
Could be that the lightbox problem started then by the path change. - Not sure about it.

Did I maybe miss any setting for the new path?  
These lines above were the only lines I found which pointed to the original directory “/var/docker”.

---

<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: [June 8, 2020, 6:42pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/14 "2020-06-08T18:42:02Z")

</div>

I just tried to move it back to “/var/discourse” to confirm it is the path change which caused it, but it is the same issue there with the original path.

It further runs behind a nginx reverse proxy which does the SSL encryption if this matters, but I have not changed anything in the configuration there since it stopped working on the other installation.

I have done these settings for nginx in the according .yml file.

```
- replace:
      filename: /etc/nginx/conf.d/discourse.conf
      from: "types {"
      to: |
        set_real_ip_from 172.18.0.0/16;
        real_ip_header X-Forwarded-For;
        real_ip_recursive on;
        types {

```

---

<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: [June 13, 2020, 10:15am UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/15 "2020-06-13T10:15:48Z")

</div>

If it is not the path, what else could cause this lightbox issue?

I moved it back to “/var/docker/dis.ctb.co.at”.  
This is my current yml configuration (only changed personal data). Could be something wrong there, or is this a Discourse issue?

```
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
# - "templates/web.ssl.template.yml"
# - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
        # - "80:80" # http
        # - "443:443" # https
  - "127.0.0.1:3041:80"

docker_args:
  - "--network=nginx-br"

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "4096MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LANG: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  UNICORN_WORKERS: 8

  ## TODO: The domain name this Discourse instance will respond to
  ## Required. Discourse will not work with a bare IP number.
  DISCOURSE_HOSTNAME: dis.ctb.co.at

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'nothing@nothing.com'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: mailserver.nothing.com
  DISCOURSE_SMTP_PORT: 25
  DISCOURSE_SMTP_USER_NAME: nothing@nothing.com
  DISCOURSE_SMTP_PASSWORD: "secret"
  DISCOURSE_SMTP_ENABLE_START_TLS: false # (optional, default true)
  DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  # LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

  ## The http or https CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: https://discourse-cdn.example.com

  VIRTUAL_HOST: dis.ctb.co.at
  VIRTUAL_PORT: 9002
  LETSENCRYPT_HOST: dis.ctb.co.at
  LETSENCRYPT_EMAIL: nothing@nothing.com

 

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/docker/dis.ctb.co.at/shared/standalone
      guest: /shared
  - volume:
      host: /var/docker/dis.ctb.co.at/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

  - replace:
      filename: /etc/nginx/conf.d/discourse.conf
      from: "types {"
      to: |
        set_real_ip_from 172.18.0.0/16;
        real_ip_header X-Forwarded-For;
        real_ip_recursive on;
        types {

```

---

<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: [June 14, 2020, 2:23pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/16 "2020-06-14T14:23:12Z")

</div>

I fiured now out, that this only happens if `Force your site to use HTTPS only` is set active when the post with the image gets created.  
I had that active on the other installation since the beginn, but it suddenly stopped working, maybe caused by an update of nginx or Discourse.

nginx does not show any strange things so far as I can see.

```
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:52 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 2 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:58 +0200] "POST /presence/publish HTTP/2.0" 200 36 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:58 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 253 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:58 +0200] "POST /uploads.json?client_id=d333cb718e2d49b9947ec22c0762e47d HTTP/2.0" 200 431 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:00 +0200] "POST /draft.json HTTP/2.0" 200 56 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:08 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 253 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:08 +0200] "POST /presence/publish HTTP/2.0" 200 36 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:16 +0200] "POST /draft.json HTTP/2.0" 200 56 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:18 +0200] "POST /draft.json HTTP/2.0" 200 56 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 251 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /presence/publish HTTP/2.0" 200 36 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 194 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /posts HTTP/2.0" 200 733 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:21 +0200] "POST /message-bus/2027eab545f744e3a8dff7e81e4748d4/poll?dlp=t HTTP/2.0" 200 258 "https://dis.ctb.co.at/admin/site_settings/category/security?filter=" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:22 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 336 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:22 +0200] "GET /posts/82 HTTP/2.0" 200 749 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:22 +0200] "GET /about/live_post_counts.json HTTP/2.0" 200 52 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:24 +0200] "POST /message-bus/2027eab545f744e3a8dff7e81e4748d4/poll?dlp=t HTTP/2.0" 200 33 "https://dis.ctb.co.at/admin/site_settings/category/security?filter=" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:27 +0200] "POST /topics/timings HTTP/2.0" 200 0 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nnginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:47 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 2 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:47 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 104 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"

```

Btw. `nnginx` is not a typo in this log, it was really shown like this for some reason.

 ![2020-06-14_16-18-03_dk1.ctb.co.at_-_PuTTY](https://global.discourse-cdn.com/meta/original/3X/3/3/33908f4f36f521c606a409cc27748c845e156b10.png)

Any idea why `Force your site to use HTTPS only` could cause any problems on the lightbox?

---

<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: [June 14, 2020, 7:00pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/17 "2020-06-14T19:00:33Z")

</div>

Usually this is due to misconfiguration of complex reverse proxy schemes in my experience. Subfolder adds additional complexity (and thus variables) as well.

---

<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: [June 14, 2020, 7:21pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/18 "2020-06-14T19:21:35Z")

</div>

Hmm, what could be then wrong with my nginx proxy configuration?

```
version: '3'

services:

  nginx:
    image: jwilder/nginx-proxy:alpine
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
    container_name: nginx
    networks:
      - nginx_nw
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./data/conf.d:/etc/nginx/conf.d:rw
      - ./data/vhost.d:/etc/nginx/vhost.d:rw
      - ./data/html:/usr/share/nginx/html:rw
      - ./data/certs:/etc/nginx/certs:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    restart: unless-stopped

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt
    depends_on:
      - nginx
    networks:
      - nginx_nw
    volumes:
      - ./data/certs:/etc/nginx/certs:rw
      - ./data/vhost.d:/etc/nginx/vhost.d:rw
      - ./data/html:/usr/share/nginx/html:rw
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: unless-stopped

networks:
    nginx_nw:
        external:
            name: nginx-br

```

I am running two seperate Discourse installations via this nginx proxy as well as a nextcloud instance. At the first Discourse installation the lightbox was working before and then it suddenly stopped. I actually did not change anything on the proxy configuration since it was working.

It interestingly still creates some files and folders in `/var/discourse`, even if I have set the volumes not to this directory.

```
volumes:
  - volume:
      host: /var/docker/dis.ctb.co.at/shared/standalone
      guest: /shared
  - volume:
      host: /var/docker/dis.ctb.co.at/shared/standalone/log/var-log
      guest: /var/log

```

So I guess there is somewhere a problem with the folder location.

```
root@dk1:/var/discourse# tree -d
.
└── shared
    └── standalone
        ├── backups
        ├── log
        │ ├── rails
        │ └── var-log
        │ ├── nginx
        │ ├── postgres
        │ └── redis
        ├── postgres_backup
        ├── postgres_data
        │ ├── base
        │ │ ├── 1
        │ │ ├── 14049
        │ │ ├── 14050
        │ │ └── 16384
        │ ├── global
        │ ├── pg_commit_ts
        │ ├── pg_dynshmem
        │ ├── pg_logical
        │ │ ├── mappings
        │ │ └── snapshots
        │ ├── pg_multixact
        │ │ ├── members
        │ │ └── offsets
        │ ├── pg_notify
        │ ├── pg_replslot
        │ ├── pg_serial
        │ ├── pg_snapshots
        │ ├── pg_stat
        │ ├── pg_stat_tmp
        │ ├── pg_subtrans
        │ ├── pg_tblspc
        │ ├── pg_twophase
        │ ├── pg_wal
        │ │ └── archive_status
        │ └── pg_xact
        ├── postgres_run
        │ └── 12-main.pg_stat_tmp
        ├── redis_data
        ├── state
        │ ├── anacron-spool
        │ └── logrotate
        ├── tmp
        │ ├── backups
        │ └── restores
        └── uploads
            └── default
                ├── optimized
                │ └── 1X
                └── original
                    └── 1X

52 directories

```

Did I maybe miss a setting for the now folder location?

---

<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: [July 4, 2020, 1:22pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/19 "2020-07-04T13:22:43Z")

</div>

It never happend that files were created in `/var/discourse`, maybe I have seen some old files.

> [@codinghorror](#):
>
> Usually this is due to misconfiguration of complex reverse proxy schemes in my experience.

I changed now from `nginx` to `traefik` to make sure that the problem comes not from `nginx`, but the issue is still present. Means to me that there is probably a problem on the Discourse side and not on the proxy side.

Same situation with `traefik`, if “https forced” is disabled when the image gets posted, then the lightbox works fine, even if I enable “https forced” later.  
What else could I check?

---

<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: [July 4, 2020, 2:25pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/20 "2020-07-04T14:25:49Z")

</div>

It shows me an error in the log file, that it cannot access `/uploads/....`

```plaintext
Can't reach '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' to get its dimension.

```

I can access the image woithout problems if I enter the url into a webbrowser:  
`https://domain.com/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png`

```plaintext
Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 3000)
Completed 200 OK in 318ms (Views: 1.2ms | ActiveRecord: 0.0ms | Allocations: 50347)
Can't reach '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' to get its dimension.
Started GET "/posts/96" for 84.115.50.36 at 2020-07-04 14:15:14 +0000
Processing by PostsController#show as JSON
  Parameters: {"id"=>"96"}

```

It shows me no error with https **not** forced.

```plaintext
Completed 200 OK in 18ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 3050)
Completed 200 OK in 296ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 49562)
Started GET "/posts/97" for 84.115.50.36 at 2020-07-04 14:17:43 +0000
Processing by PostsController#show as JSON
  Parameters: {"id"=>"97"}

```

It looks to me as if Discourse downloads for some reason the image again from the webserver to do some lightbox stuff with it.  
If i download this image manually within the Discourse Docker container, then it tries to access its webserver directly via its internal IP address instead if accessing it via the proxy. This works via http, but not via http **s**.

> [@Lightbox not showing up on uploaded images after update](https://meta.discourse.org/t/lightbox-not-showing-up-on-uploaded-images-after-update/73009/13):
>
> I am having the same issue. Can't reach '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' to get its dimension. I can access the picture from the outside, but not within the Docker image. root@dk1-dis:/shared/log/rails# wget https://dis.domain.com/uploads/default/original/1X/b2ef855c010c044aee13177269baaa36453c6193.png --2020-07-04 14:53:33-- https://dis.domain.com/uploads/default/original/1X/b2ef855c010c044aee13177269baaa36453c6193.png Resolving dis.domain.com (dis…

The webserver itself has only http available, but it tries to access it via https what then fails.

I am wondering why does Discourse downloads the picture again from its webserver instead of accessing it internaly without http/https.

**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.

---

<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: [July 4, 2020, 8:32pm UTC](https://meta.discourse.org/t/our-discourse-images-are-not-lightboxed/84004/21 "2020-07-04T20:32:45Z")

</div>

If double dots in the YML are causing this it sounds like something which should throw a warning in launcher?

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