I have moved it to the top of the function and it's still not working, this is PS 1.7.7.8
protected function attributeImportOne($info, $default_language, &$groups, &$attributes, $regenerate, $shop_is_feature_active, $validateOnly = false)
{
AdminImportController::setDefaultValues($info);
//start edit
$suffix = array('','a','b');
foreach ($suffix as $suff){
if (file_exists(_PS_TMP_IMG_DIR_.$info['product_reference'].$suff.'.jpg')){
$info['image_url'] = _PS_TMP_IMG_DIR_.$info['product_reference'].$suff.'.jpg';
}
}
// end edit
It was just after the $id_image = []; line