# Why is another image generated with a new name?

**URL:** <https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464>\
**Category:** Developer help\
**Created:** [December 9, 2018, 6:30pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464 "2018-12-09T18:30:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![GodoFredoNinja](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/godofredoninja/32/179_2.png) [@GodoFredoNinja](https://forum.ghost.org/u/GodoFredoNinja)\
**Post date:** [December 9, 2018, 6:30pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/1 "2018-12-09T18:30:25Z")

</div>

Hi 😄

First I want to mention when I upload an image I generate another image.

This new generated image is not being used.

And this is a problem because the new image generated has more weight than the original and this take up the storage space of the server.

For example:

— **Original Image**

- Name: example.jpg
- Size : 41.6 KB
- Dimensions: 1221 x 725

— **New image generated**

- Name: example\_o.jpg
- Size : 129 KB
- Dimensions: 1221 x 725

I need someone to explain to me what this is about, or it’s a ghost error.

I’m using the latest version of ghost

---

<div class="post-metadata">

**Author:** ![HauntedThemes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hauntedthemes/32/15301_2.png) [@HauntedThemes](https://forum.ghost.org/u/HauntedThemes)\
**Post date:** [December 9, 2018, 8:32pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/2 "2018-12-09T20:32:05Z")

</div>

From [this line of code](https://github.com/TryGhost/Ghost/blob/fcd275f6c098684ad615b02d0714cf38e5cd8f44/core/server/web/shared/middlewares/image/normalize.js#L37) it looks like the `_o` image is the original one and the other one is the image compressed.

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [December 9, 2018, 8:40pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/3 "2018-12-09T20:40:32Z")

</div>

There was an issue in pre 2.6.0 versions ([Pre-optimized image size increases after upload · Issue #10144 · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/issues/10144)) but that should be fixed now 😕

---

<div class="post-metadata">

**Author:** ![GodoFredoNinja](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/godofredoninja/32/179_2.png) [@GodoFredoNinja](https://forum.ghost.org/u/GodoFredoNinja)\
**Post date:** [December 10, 2018, 7:28pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/4 "2018-12-10T19:28:00Z")

</div>

@HauntedThemes  
@vikaspotluri123

Thank you for answering 😃

The original image has the end of `_o` -\> `example_o.jpg` and the optimized is `example.jpg`

This also happens when you upload an optimized image, both have the same size.

— But this is still a problem.

I think the non-optimized image should be removed. To have more storage space on our server.

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [December 11, 2018, 10:33am UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/5 "2018-12-11T10:33:36Z")

</div>

@GodoFredoNinja the original image needs to be kept around so that it’s possible to re-generate compressed/resized images. Storage space should not be much of a concern these days, especially when considering the relatively small size of images.

---

<div class="post-metadata">

**Author:** ![pascalandy](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pascalandy/32/444_2.png) [@pascalandy](https://forum.ghost.org/u/pascalandy)\
**Post date:** [December 11, 2018, 5:27pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/6 "2018-12-11T17:27:55Z")

</div>

I don’t agree. The compressed images may be problematic and it’s best practice to keep them.  
Actually, the compressed images are bigger in my case. I use JPEGmini which is better at this point.

Just jump in your server to delete them: `rm *_o.jpg`

> [@GodoFredoNinja](#):
>
> I think the non-optimized image should be removed

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [December 12, 2018, 11:56am UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/7 "2018-12-12T11:56:17Z")

</div>

> [@pascalandy](#):
>
> Just jump in your server to delete them: `rm *_o.jpg`

_Don’t do this!_ The `*_o.jpg` images are the originals, if you’re deleting them you risk breaking future functionality where Ghost will generate thumbnail images optimised for different use-cases within a theme.

The best thing to do is leave your images directory alone and let Ghost manage it as needed. If you find particular problems where an optimised image has ended up being larger than the original please raise an issue because that is definitely a bug!

---

<div class="post-metadata">

**Author:** ![pascalandy](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pascalandy/32/444_2.png) [@pascalandy](https://forum.ghost.org/u/pascalandy)\
**Post date:** [December 12, 2018, 3:30pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/8 "2018-12-12T15:30:19Z")

</div>

OK good to know 😅.

---

<div class="post-metadata">

**Author:** ![GodoFredoNinja](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/godofredoninja/32/179_2.png) [@GodoFredoNinja](https://forum.ghost.org/u/GodoFredoNinja)\
**Post date:** [December 13, 2018, 5:03pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/9 "2018-12-13T17:03:25Z")

</div>

Thank you for taking the time and explaining in the doubt that I had. So, for the moment, I’ll leave things as they are to see what happens in future versions of Ghost. 😄

---

<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:** [December 14, 2018, 8:39am UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/10 "2018-12-14T08:39:25Z")

</div>

If you _really_ don’t want duplicate images or are worried about storage space, you can set the [`imageOptimization`](https://github.com/TryGhost/Ghost/blob/master/core/server/config/defaults.json#L82-L84) config to have `resize` set as `false`

e.g.

```json
{
  "imageOptimization": {
    "resize": false
  }
}

```

---

<div class="post-metadata">

**Author:** ![b166ar](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/b166ar/32/1905_2.png) [@b166ar](https://forum.ghost.org/u/b166ar)\
**Post date:** [December 14, 2018, 10:42pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/11 "2018-12-14T22:42:10Z")

</div>

I’m a Ghost Pro user and I don’t have this issue with image file sizes. I was a bug in 2.6 version. I had to reoptimize all my images… but now it works fine. Just checked.

---

<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:** [December 28, 2018, 10:42pm UTC](https://forum.ghost.org/t/why-is-another-image-generated-with-a-new-name/4464/12 "2018-12-28T22:42:14Z")

</div>

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