Handle `jpeg` file extension correctly

Fixes #844