Welcome Guest, Not a member yet? Register   Sign In
Resize image after uploading
#1

[eluser]kolxoznik1[/eluser]
I need to upload picture and after make a small pictures, everything with code is ok. I would like to ask about
Code:
$this->upload->do_upload('aaa')
. As I understand we do not have a chance to resize first upload image. In my case I do not need a big image 1) max 600 width 2) others smaller. I read a lot and as I understand the best way is

1) upload to folder for example 'test';
2) resize so many time as need
3) delete big image from test folder

Maybe is a way not to do this steps but upload and resize?

Code:
$config = array(
           'upload_path' => './upload/',
           'allowed_types' => 'gif|jpg|png',
           'max_size' => '2000',
           'max_width' => '2024',
           'max_height' => '2000'
                 //'encrypt_name' => true,
          );
        
          $this->load->library('upload', $config);
        
          $this->upload->do_upload('aaa')





Theme © iAndrew 2016 - Forum software by © MyBB