# Hacking the Ghost Core

**URL:** <https://forum.ghost.org/t/hacking-the-ghost-core/3250>\
**Category:** Developer help\
**Created:** [September 24, 2018, 5:51am UTC](https://forum.ghost.org/t/hacking-the-ghost-core/3250 "2018-09-24T05:51:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrwhip](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jrwhip](https://forum.ghost.org/u/jrwhip)\
**Post date:** [September 24, 2018, 5:51am UTC](https://forum.ghost.org/t/hacking-the-ghost-core/3250/1 "2018-09-24T05:51:27Z")

</div>

I need post images to display using an `<img ix-src="..." />` tag rather than an `<img src="..." />` tag.

I have installed a ghost installation on my machine using the steps outlined at [https://docs.ghost.org/docs/working-with-ghost](https://docs.ghost.org/docs/working-with-ghost)

It appears to me that the changes I need can be made by modifying the image.js file located at:  
Ghost—\>core—\>server—\>lib—\>mobiledoc—\>cards—\>image.js

I changed this line of code from this:

```
let img = dom.createElement('img');
img.setAttribute('src', payload.src);

```

To:

```
let img = dom.createElement('img');
img.setAttribute('ix-src', payload.src);

```

However, the changes don’t appear to have any effect. I’m unsure if I am editing the correct file, or if there is a step I need to do to get the changes to take effect besides just running `grunt dev`

---

<div class="post-metadata">

**Author:** ![egg](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/egg/32/1691_2.png) [@egg](https://forum.ghost.org/u/egg)\
**Post date:** [September 24, 2018, 8:21am UTC](https://forum.ghost.org/t/hacking-the-ghost-core/3250/2 "2018-09-24T08:21:34Z")

</div>

Are you looking at posts that are already created? If so they won’t be run through the mobiledoc conversion. I’ve tried your change locally and newer posts contain the correct attribute. If you need older posts to be updated, then you’ll have to create a migration similar to the one here: [https://github.com/TryGhost/Ghost/blob/master/core/server/data/migrations/versions/2.0/2-update-posts.js](https://github.com/TryGhost/Ghost/blob/master/core/server/data/migrations/versions/2.0/2-update-posts.js)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [October 8, 2018, 8:21am UTC](https://forum.ghost.org/t/hacking-the-ghost-core/3250/3 "2018-10-08T08:21:38Z")

</div>

Closed on October 8, 2018, 8:21am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
