# Images with \] character in filename don't display properly

**URL:** https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240
**Category:** Bug
**Created:** [17 januari 2018 om 02:22 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240 "2018-01-17T02:22:25Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [17 januari 2018 om 02:22 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/1 "2018-01-17T02:22:25Z")

</div>

Video stills taken from GoPro videos are in jpg format. When members try and upload these specific images to my forum they do not Onebox or even display at all (end up as a non-clickable url).

The thing is, **they work fine here**.

All other images (i.e., non GoPro video stills) work on my forum just fine. Oddly enough, if I take the offending GoPro jpg and export it without making any changes (again, as a jpg) from any image editor then the same image displays just fine.

What am I missing?

Here’s a [link](https://www.dropbox.com/s/0pr5tojogbpv5t1/forum-video-still-jpg-not-working.mov?dl=0) to the screencast:

[https://dl.dropboxusercontent.com/s/0pr5tojogbpv5t1/forum-video-still-jpg-not-working.mov?dl=1](https://dl.dropboxusercontent.com/s/0pr5tojogbpv5t1/forum-video-still-jpg-not-working.mov?dl=1)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [17 januari 2018 om 03:18 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/2 "2018-01-17T03:18:14Z")

</div>

Are those very large size raw images?

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [17 januari 2018 om 06:49 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/3 "2018-01-17T06:49:02Z")

</div>

354KB – well under the size cap. I can reproduce the issue at will. A couple members that have GoPro’s cannot get any jpg (from still) to work. I was happy to see that the images work fine here, and am hoping I’m just missing a plugin or something. My forum is up to date.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [17 januari 2018 om 07:21 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/4 "2018-01-17T07:21:09Z")

</div>

Is it happening here on meta or [try.discourse.org](http://try.discourse.org) as well?

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [17 januari 2018 om 07:22 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/5 "2018-01-17T07:22:36Z")

</div>

It works fine here on meta, just not on my forum.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [17 januari 2018 om 07:29 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/6 "2018-01-17T07:29:06Z")

</div>

AFAIK there is no plugin that handles oneboxing or uploads. That all is built in to discourse.  
one question though! Do they not get oneboxed even after you click post/reply?

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [17 januari 2018 om 07:32 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/7 "2018-01-17T07:32:44Z")

</div>

Yeah, nothing happens – the uploaded image effectively becomes just a ‘dead’ link, like this:

![09]|690x388](upload://uzG6vZHkaFDx5K44ci8JKxqweZX.jpg)

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [17 januari 2018 om 09:02 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/8 "2018-01-17T09:02:35Z")

</div>

Looks like your filename having the `]` symbol. Try again by removing it.

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [17 januari 2018 om 19:09 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/9 "2018-01-17T19:09:02Z")

</div>

The file name is GP067894.jpg.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [17 januari 2018 om 19:36 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/10 "2018-01-17T19:36:34Z")

</div>

Can you provide a link so we can download a GoPro video still? I’m curious if there’s anything inherently different from other JPGs.

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [18 januari 2018 om 18:12 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/11 "2018-01-18T18:12:38Z")

</div>

Sure, below is the image as uploaded to my Dropbox.

[![](https://global.discourse-cdn.com/meta/original/3X/a/5/a54efca224504719819dcb771d3919e16b5d4d43.jpg) ](https://dl.dropboxusercontent.com/s/ybjlaknyzdd8h7t/GP067894.jpg?dl=0)

Remember, the image works fine on this forum but **not on my forum** , where it only shows the URL (as illustrated in the first post of this thread:

[http://forum.singletrackbc.com/t/out-for-a-rip-with-al/758](http://forum.singletrackbc.com/t/out-for-a-rip-with-al/758)

Again, to my knowledge, this only happens with jpg’s shot with a GoPro.

---

<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: [18 januari 2018 om 20:38 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/12 "2018-01-18T20:38:40Z")

</div>

Is your site on latest code, like try and meta are?

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [19 januari 2018 om 00:01 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/13 "2018-01-19T00:01:09Z")

</div>

Just checked 2.0.0.beta1+93

---

<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: [19 januari 2018 om 00:11 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/14 "2018-01-19T00:11:05Z")

</div>

Have you rebuilt at the command line recently? You need that to get the latest container, etc. If we can’t repro this on try or meta, it’s not a bug in Discourse by definition.

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [19 januari 2018 om 01:21 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/15 "2018-01-19T01:21:48Z")

</div>

> [@codinghorror](#):
>
> Have you rebuilt at the command line recently?

Pardon my ignorance, but does that mean running this?

`./launcher rebuild app`

---

<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: [19 januari 2018 om 01:25 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/16 "2018-01-19T01:25:18Z")

</div>

`git pull` beforehand, in the correct directory, but yes 😉

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [19 januari 2018 om 07:28 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/17 "2018-01-19T07:28:56Z")

</div>

All done. I also ran OS updates and upgrades, then upgraded the Droplet to the new pricing plan specs (4GB/2CPU/80GB). Unfortunately, the same issue happens when I try to upload the exact same image that was uploaded (and working) in this thread.

When trying to insert the image the result is simply a line of plain text:

![31]|690x387](upload://nAo0GVB2DXSk484vgstfhPG1BQv.jpg)

I have no idea why this is happening.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [19 januari 2018 om 07:34 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/18 "2018-01-19T07:34:53Z")

</div>

> [@vinothkannans](#):
>
> Looks like your filename having the ] symbol. Try again by removing it.

It’s the extra closing square bracket, wherever that is coming from.  
`![31|690x387](upload://nAo0GVB2DXSk484vgstfhPG1BQv.jpg)`

 ![31](https://global.discourse-cdn.com/meta/original/3X/a/5/a54efca224504719819dcb771d3919e16b5d4d43.jpg)

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [19 januari 2018 om 07:39 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/19 "2018-01-19T07:39:24Z")

</div>

What closing bracket? The file name is GP067894.jpg

---

<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: [19 januari 2018 om 07:55 UTC](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240/20 "2018-01-19T07:55:00Z")

</div>

Not the filename, the insertion text:

`![31]|690x387](upload://nAo0GVB2DXSk484vgstfhPG1BQv.jpg)`  
` ----^`

Do you see the character I have marked above with the `^` caret? It is incorrect.

 ![http-error-404-not-found](https://global.discourse-cdn.com/meta/original/3X/8/8/88c88c21830fd8c1d3a5528d1c7e9f906549ff67.jpg)

In the above example the filename of the image I uploaded was ..

`http-error-404-not-found.jpg`

.. on disk which results in

`![http-error-404-not-found|499x499](upload://jw2BCroZfVX1dZChRVVvApQAjrh.jpg)`

Your image, on disk, must have `]` in the filename and this is causing problems:

`bad filename].jpg`

Perhaps this is a bug in Discourse, we should probably remove those bracket characters @vinothkannans as they are valid in filenames at least in Windows, and we are only using them for the alt text anyway.

[Volgende pagina](https://meta.discourse.org/t/images-with-character-in-filename-dont-display-properly/78240.md?page=2)
