# SVGs missing from new install

**URL:** https://meta.discourse.org/t/svgs-missing-from-new-install/294754
**Category:** Development
**Tags:** dev-install
**Created:** [February 8, 2024, 10:23pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754 "2024-02-08T22:23:14Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![ewd910](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewd910/32/354522_2.png) [@ewd910](https://meta.discourse.org/u/ewd910)
#### Post date: [February 8, 2024, 10:23pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/1 "2024-02-08T22:23:14Z")

</div>

Hi, any idea what could have caused my site to lose all the svg icons, and is there any way to get them back? It’s a brand new docker installation

 ![Screenshot 2024-02-08 at 5.07.09 PM](https://global.discourse-cdn.com/meta/original/4X/7/2/6/726cf598047bfcdcfae8382126c6732211d14aaa.png)

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [February 8, 2024, 10:49pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/2 "2024-02-08T22:49:21Z")

</div>

Try enabling `force-https`? Refresh using Ctrl + F5 to dump cache?

---

<div class="post-metadata">

### Author: ![ewd910](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewd910/32/354522_2.png) [@ewd910](https://meta.discourse.org/u/ewd910)
#### Post date: [February 8, 2024, 10:56pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/3 "2024-02-08T22:56:28Z")

</div>

It’s definitely not a cache issue. Can’t force https either because I’m running it locally

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [February 8, 2024, 11:04pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/4 "2024-02-08T23:04:27Z")

</div>

What shows up in the network logs?

---

<div class="post-metadata">

### Author: ![ewd910](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewd910/32/354522_2.png) [@ewd910](https://meta.discourse.org/u/ewd910)
#### Post date: [February 8, 2024, 11:30pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/5 "2024-02-08T23:30:21Z")

</div>

```plaintext
[08/Feb/2024:23:28:10 +0000] "localhost:8087" 192.168.65.1 "GET /svg-sprite/localhost:8087/svg-1-35f1b7e7d78d4b224c6ced63e8fc60a8ee1add9f.js HTTP/1.1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "-" 404 2915 "http://localhost:8087/" 0.027 0.026 "-" "-" "-" "-" "-" "-" "-"

```

This might have something to do with it? Not sure what the base url is doing in the middle of that file path

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [February 8, 2024, 11:50pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/6 "2024-02-08T23:50:37Z")

</div>

Huh, that seems… Very wrong. I don’t think I can really help much here personally, I hope someone else can.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 9, 2024, 8:01am UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/7 "2024-02-09T08:01:37Z")

</div>

I think on a dev install you need to change the port to get images:

> [@Dev Environment: Missing port leads to broken images](https://meta.discourse.org/t/dev-environment-missing-port-leads-to-broken-images/107388/2):
>
> It’s a hidden setting. Try changing it in the rails console. bin/rails c SiteSetting.port = 3000

---

<div class="post-metadata">

### Author: ![ewd910](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewd910/32/354522_2.png) [@ewd910](https://meta.discourse.org/u/ewd910)
#### Post date: [February 9, 2024, 3:40pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/8 "2024-02-09T15:40:40Z")

</div>

That’s a different issue entirely. You can see that the resource my install is requesting has the port number 8087 in the url already

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 9, 2024, 4:07pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/9 "2024-02-09T16:07:38Z")

</div>

Dev installs aren’t my forte. 🙂 Hopefully someone else has some insights. 🤞

---

<div class="post-metadata">

### Author: ![ewd910](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewd910/32/354522_2.png) [@ewd910](https://meta.discourse.org/u/ewd910)
#### Post date: [February 13, 2024, 6:34pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/10 "2024-02-13T18:34:05Z")

</div>

Can someone with a working installation tell me what their `svgSpritePath` is set to?  
Mine is “/svg-sprite/localhost:8087/svg-1-35f1b7e7d78d4b224c6ced63e8fc60a8ee1add9f.js” which clearly isn’t right, not sure where that’s coming from though

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 13, 2024, 7:02pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/11 "2024-02-13T19:02:00Z")

</div>

> [@ewd910](#):
>
> localhost:8087

That’s probably the issue. It likely expects the domain without the port. (mine doesn’t have the port)

I’m not using a docker dev install, so I really don’t know.

In my case (Windows WSL), the URL is `http://localhost:4200`, and to start Discourse I use this command: `DISCOURSE_HOSTNAME=localhost UNICORN_LISTENER=localhost:3000 bin/ember-cli -u`

So I’m thinking that maybe you need to define `DISCOURSE_HOSTNAME` or similar?

---

<div class="post-metadata">

### Author: ![ewd910](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewd910/32/354522_2.png) [@ewd910](https://meta.discourse.org/u/ewd910)
#### Post date: [February 13, 2024, 7:49pm UTC](https://meta.discourse.org/t/svgs-missing-from-new-install/294754/12 "2024-02-13T19:49:02Z")

</div>

Yeah I was just about to post-- svgs aren’t loading because the js file they’re in has the url [http://localhost:8087/svg-sprite/localhost/svg-](http://localhost:8087/svg-sprite/localhost/svg-)…  
and that script is trying to load  
[http://localhost:8087/svg-sprite/localhost:8087/svg-](http://localhost:8087/svg-sprite/localhost:8087/svg-)…  
So the port in the hostname is the problem.  
When I change `DISCOURSE_HOSTNAME` to simply `localhost` however the site doesn’t load at all. Seems like it needs the port some places but not others
