# Theme asset not loading

**URL:** <https://forum.ghost.org/t/theme-asset-not-loading/54632>\
**Category:** Themes\
**Created:** [January 23, 2025, 8:06am UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632 "2025-01-23T08:06:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ucorina](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ucorina/32/6284_2.png) [@ucorina](https://forum.ghost.org/u/ucorina)\
**Post date:** [January 23, 2025, 8:06am UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632/1 "2025-01-23T08:06:27Z")

</div>

I have a self-hosted Ghost instance that uses a modified Dawn theme.  
I added a new image to the theme “assets” folder and included it using `<img src="{{asset 'images/bla.png'}}" />`

Image shows up fine when developing locally, but when I push the changes to the server, it doesn’t load.  
I checked the folder on the server and the image is there.  
If I try to load the image in the browser, by just pasting its URL in the address bar, server returns 200, but image doesn’t load - it shows the default browser placeholder.

 ![Screenshot 2025-01-23 at 09.03.18](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/4/2/42088b3b8dd608e99c99a36531e0a72d7f1aca1b.png)  
 ![Screenshot 2025-01-23 at 09.00.47](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/6/1/61e2ca95fe788706d2b5bc45f434a3e5b8f22006.png)

My hunch was that this was a permissions issue, so I did `chmod 00775` on the image file and then `ghost restart`, but this did not solve the issue.

I’m a bit at a loss about what to try next 😅

---

<div class="post-metadata">

**Author:** ![joe-blocher](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joe-blocher/32/27872_2.png) [@joe-blocher](https://forum.ghost.org/u/joe-blocher)\
**Post date:** [January 23, 2025, 2:36pm UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632/2 "2025-01-23T14:36:49Z")

</div>

Try this

```auto
<img src="/assets/images/bla.png" />

```

What do the DevTools in the browser (elements, console …) say?

Where did you include the image:  
In the theme ('\*.hbs file) or in a post (HTML) …

Is the “url” of config.production.json on the server correct?

---

<div class="post-metadata">

**Author:** ![ucorina](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ucorina/32/6284_2.png) [@ucorina](https://forum.ghost.org/u/ucorina)\
**Post date:** [January 24, 2025, 4:48pm UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632/3 "2025-01-24T16:48:56Z")

</div>

I checked and the HTML is already `<img src="/assets/images/bla.png?v=932db264d7">`, so the `asset` helper works correctly.  
I Included the `img` tag in an `hbs` file. The server URL is also correct in `config.production.json`.

If I manually try to load the image, using the path it _should_ have, it still doesn’t load. This is why my first thought was to look at the file permissions.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [January 24, 2025, 4:53pm UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632/4 "2025-01-24T16:53:09Z")

</div>

can you link the site? that might be informative.

---

<div class="post-metadata">

**Author:** ![ucorina](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ucorina/32/6284_2.png) [@ucorina](https://forum.ghost.org/u/ucorina)\
**Post date:** [January 24, 2025, 5:51pm UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632/5 "2025-01-24T17:51:39Z")

</div>

Sure! It’s reactpractice.dev.  
You can see the image not loading on posts, like this one: [Build a restaurant reservation widget](https://reactpractice.dev/exercise/build-a-restaurant-reservation-widget/)  
If you scroll all the way down, in the “Subscribe” box, the image on the right side does not load.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [January 24, 2025, 6:06pm UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632/6 "2025-01-24T18:06:39Z")

</div>

So that link goes to: [https://reactpractice.dev/assets/images/react-practice-calendar.png?v=932db264d7](https://reactpractice.dev/assets/images/react-practice-calendar.png?v=932db264d7)

When I visit that link, I get a corrupted image.

Any chance you’re using Gulp to assemble your theme? (This is true for many themes.) A recent release of gulp can corrupt images depending one the settings used. I wonder if that’s what’s going on here. If you have direct server access, try dropping a fresh (and known good!) image on the server, perhaps. Otherwise, this thread might help: [Upgrade to gulp 5.0 breaks building theme assets (corrupted fonts, images, etc)](https://forum.ghost.org/t/upgrade-to-gulp-5-0-breaks-building-theme-assets-corrupted-fonts-images-etc/50571)

Actually, yeah, I’m pretty sure that’s it, because I also see errors for loading fonts… check that out - if’s got a solution – or downgrade to gulp 4.x.

_And now, my cloud deploy is done and I’m outa getting back to (paid) work!_

---

<div class="post-metadata">

**Author:** ![ucorina](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ucorina/32/6284_2.png) [@ucorina](https://forum.ghost.org/u/ucorina)\
**Post date:** [January 24, 2025, 6:16pm UTC](https://forum.ghost.org/t/theme-asset-not-loading/54632/7 "2025-01-24T18:16:18Z")

</div>

Oh my god, this was the issue! I set encoding to false in `gulpfile.js` and the image is now correctly rendered 💪

Thank you so much for your help, I would have never figured this out by myself 😅
