One thing to try after upgrading to 3.1.2 is to flush your permalinks. Sometimes that'll get in the way. Otherwise, check plugins (turn 'em all off, then try your images) and make sure all plugins are updated.