Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9212375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:30:41+00:00 2026-06-18T01:30:41+00:00

i am using codeigniter upload library and i want to resize the image. but

  • 0

i am using codeigniter upload library and i want to resize the image. but when I run the code it save the image but its not resizing the image. here is my php code:

                 $this->load->library('upload');

                 $config['upload_path'] = APPPATH .'../images/student';
                 $config['allowed_types'] = 'gif|jpeg|jpg|png';
                 $config['max_size']      = '2000';
                 $config['maintain_ratio']= FALSE;
                 $config['master_dim']    = 'auto';
                 $config['width']         = 128;
                 $config['height']        = 128;
                 $config['overwrite']     = FALSE;
                 //initialize
                 $this->upload->initialize($config);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:30:42+00:00Added an answer on June 18, 2026 at 1:30 am

    As pointed out by @relentless you need to use the Image Manipulation Class. The upload class is only helping you to upload the image, not resize it.

    The width and height configurations are there to restrict the size of the image you can upload.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly, I'm not asking how to perform a multi-file upload using CodeIgniter, but rather
I tried to upload a vcard file using codeigniter. But It's not allowed to
It's ok to upload image in file using codeigniter upload library with this example.
This is my code to upload image using ajaxfileupload and Jquery in my codeigniter
I'm trying to resize an image using codeigniter's image lib library. Pretty simple. However,
I'm using CodeIgniter + Zend libraries. I want to let users upload videos to
I have been trying to upload an image using CodeIgniter's File Upload class. The
I'm using this code to resize images in CodeIgniter $config['image_library'] = 'gd2'; $config['source_image'] =
How to upload image on page using ajax in codeigniter? On form image needs
I am using Codeigniter with the TankAuth library installed and trying to upload to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.