# Problem with responsive images in custom theme

**URL:** <https://forum.ghost.org/t/problem-with-responsive-images-in-custom-theme/14958>\
**Category:** Themes\
**Created:** [June 8, 2020, 9:20am UTC](https://forum.ghost.org/t/problem-with-responsive-images-in-custom-theme/14958 "2020-06-08T09:20:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreborud](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andreborud/32/1237_2.png) [@andreborud](https://forum.ghost.org/u/andreborud)\
**Post date:** [June 8, 2020, 9:20am UTC](https://forum.ghost.org/t/problem-with-responsive-images-in-custom-theme/14958/1 "2020-06-08T09:20:15Z")

</div>

I have a modified version of casper where the images in **post-card.hbs** isn’t loading. Or rather it looks like the images aren’t generates when looking through the content/images folder. The images are generated like they should be when running on a local ghost installation, but not in production. But if I switch to casper in production the images are generated.

In my package.json I have this

```
   "config": {
    "posts_per_page": 100,
    "image_sizes": {
        "s": {
            "width": 300
        },
        "m": {
            "width": 600
        },
        "l": {
            "width": 1000
        },
        "xl": {
            "width": 2000
        }
    }
}

```

And in my post-card.hbs I have this:

```
<img class="post-card-image"
            srcset="{{img_url feature_image size="s"}} 300w,
                    {{img_url feature_image size="m"}} 600w,
                    {{img_url feature_image size="l"}} 1000w,
                    {{img_url feature_image size="xl"}} 2000w"
            sizes="400px"
            src="{{img_url feature_image size="s"}}"
            alt="{{title}}"
        />

```

So in the post card I only ever want to use the small image. The small image however is never generated. Inspecting the html in a browser the url looks right. But the small image is never generated in content/images/sizes…

Any ideas?

---

<div class="post-metadata">

**Author:** ![andreborud](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andreborud/32/1237_2.png) [@andreborud](https://forum.ghost.org/u/andreborud)\
**Post date:** [June 9, 2020, 2:23pm UTC](https://forum.ghost.org/t/problem-with-responsive-images-in-custom-theme/14958/2 "2020-06-09T14:23:54Z")

</div>

Never mind. Not a ghost problem, but a server side problem.
