Let me recommend a free and easy to use one RIOT - Radical Image Optimization Tool
It can resize (in fact it will insist to resize (800px is more than enough for a web image)) your image and optimise. Recently it start to work with a group of images.
Now for Dimas, just an idea, for 4.2 check the config.php those lines. I assume the trouble is there. 5Mb pics are bigger than 2592px
// Image Processing Options
// Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings.
$config['Misc']['maxwidth'] = 2592;
$config['Misc']['maxheight'] = 2592;