Skip to content

Weird Heroku Gotcha: JPG not JPEG

I just deployed a change to Heroku where I added a .jpeg image and it broke the app.

Apparently, you cannot use .jpeg extensions on Heroku – at least not using Rail’s <%= image_tag %>. I didn’t attempt using a HTML <img> tag to see if the issue still occurred. I’m thinking it might’ve been fine in that case.

Nonetheless, changing the file extension to .jpg and updating the corresponding <%= image_tag %> to .jpg resolved the issue.

Subscribe below to get future posts from Daniel