Heroku images won't work

I have the weirdest problem with my Heroku app. Nothing but one of the images I clicked on them is loaded into production. All I get is a 404 error. They work great locally. I know this is not the way to go, because ... well, here is a sample mlab collection. The no_image_thumb.gif image works fine, but other images like HG01522.jpg just return a 404 error.

{
            "id": 794,
            "itemno": "HG01522",
            "image": "images/prodimg/HG01522.jpg",
            "name": "FIXED SNAP SHACKLES",
            "price": 25.25,
            "dfec": 68.175,
            "dpec": 95.87327535,
            "category": "BOATHARDWA",
            "selected": 0
        },
        {
            "id": 795,
            "itemno": "HG01602",
            "image": "images/prodimg/no_image_thumb.gif",
            "name": "SHACKLE LOCKING  316 8MM",
            "price": 12.3,
            "dfec": 33.21,
            "dpec": 46.70262522,
            "category": "BOATHARDWA",
            "selected": 0
        }
      

Run codeHide result


How can I fix this?

+3


source to share


1 answer


Are your images part of the code or are they downloaded from your site? If its second, then you are doing it wrong. Heroku re-deploys your application every day and you lose your images. So go for services like aws s3 or the cloud



+2


source







All Articles