您的服务器不支持处理此类图像所需的GD功能

Your server does not support the GD function required to process this type of image. is smashing my head. I don't understand which part is wrong! Path should be accurate.

Given that source image is resources/images/upload/BAACN_13853.jpeg

for($i=0; $i<count($result); $i++){
    if($result[$i]['condition'] == "Success"){
        //**************** RESIZE *******************/

            $config['image_library'] = 'GD2';
            $config['source_image'] = $result[$i]['msg'];
            $config['new_image'] = "/resources/images/upload_thumb/";
            $config['create_thumb'] = TRUE;
            $config['maintain_ratio'] = TRUE;
            if($width != NULL || $width != 0){
                $config['width'] = $width;
            }
            if($width != NULL || $width != 0){
                $config['height'] = $height;
            }

            $this->load->library('image_lib', $config); 

            if($this->image_lib->resize()){
                echo $result[$i]['msg']." resized successfully.<br>";
            }else{
                echo $result[$i]['msg']." resized failed!!<br>";
            };
            $this->image_lib->clear();
    }else{

        echo $result[$i]['msg']."<br>";
    }
}

May be you are loading image_lib multiple times. Don't load image_lib multiple times. Add image_lib in autoload libs and change

$this->load->library('image_lib', $config);

to

$this->image_lib->initialize($config);

To solve this removing the forward slash at the beginning in the following like so:

$config['source_image'] = $result[$i]['msg'];
$config['new_image'] = "/resources/images/upload_thumb/";

Make sure that $result[$i]['msg'] doesn't begin with forward slash