Clean install 3.1.0.
Inside any controller action:
#works, returns "text/html"
#does not work, returns "nil"
I'm led to believe that it is intended to work as I expected judging from this code found in mime_types.rb:
Mime::Type.register "image/jpeg", :jpeg, , %w(jpg jpeg jpe)
The file you are looking at is the edge version. The 3.1 version doesn't have the image types registered.
You can register more mime types in config/initializers/mime_types.rb in your application.