resize(PROJECT_BASE . '/' . $path, PROJECT_BASE . '/' . $path . '-001', $max_thumb); if ($resized) { @rename($path . '-001', $path); } } }