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 8968719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:29:37+00:00 2026-06-15T17:29:37+00:00

hey guys i have this problem, and i was spending 4-5 hours looking for

  • 0

hey guys i have this problem, and i was spending 4-5 hours looking for a solution
here is my code

$config = array(
            'upload_path' => './uploads/menus',
            'allowed_types' => 'gif|jpg|jpeg|png',
            'max_size' => '15000'
        );
        $this->upload->initialize($config);

        if ($this->upload->do_upload('image'))
        {

                $image_data = $this->upload->data();
                $thumbnail = 'thumb_' . $image_data['file_name'];
                $thumb['image_library'] = 'gd2';
                $thumb['source_image'] = $image_data['full_path'];
                $thumb['create_thumb'] = TRUE;
                $thumb['thumb_marker'] = '';
                $thumb['new_image'] = $image_data['file_path'] . 'thumbs/' . $thumbnail;
                $thumb['maintain_ratio'] = TRUE;
                $thumb['width'] = 90;
                $thumb['height'] = 90;
                $this->load->library('image_lib', $thumb);
                if($this->image_lib->resize())
                {
                    $img_details = array(
                                        'menu_id' => $this->db->insert_id(),
                                        'full_path' => $image_data['full_path'],
                                        'image_name' => $image_data['file_name'],
                                        'thumb_path' => $thumb['new_image'],
                                        'thumb_name' => $thumbnail,
                                    );

                    $upload = $this->db->insert('menus_images', $img_details);
                    return $upload;
                }
        }

I’m using PyroCMS, and i’m developing a module in which i need to upload images. So far so good, my problem is this:
The image gets uploaded, the resize check is passing with no problem, is inserting the correct data in db, but in “thumbs” folder is NOT creating any thumb whatsoever.
If you have any suggestions please give me some help.
Thank you!

  • 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-15T17:29:38+00:00Added an answer on June 15, 2026 at 5:29 pm

    You can use Stream APi to develop your module. By the way I use PyroCMS and I’ve just finished a new module and I use codeigniter lib to create thumb with no problem.
    You code semms correct, the only thing that I can suggest you is to separate the loading of the image_lib and its initialization in this way:

    $this->load->library('image_lib');
    
    $thumbnail = 'thumb_' . $image_data['file_name'];
    $thumb['image_library'] = 'gd2';
    $thumb['source_image'] = $image_data['full_path'];
    $thumb['create_thumb'] = TRUE;
    $thumb['thumb_marker'] = '';
    $thumb['new_image'] = $image_data['file_path'] . 'thumbs/' . $thumbnail;
    $thumb['maintain_ratio'] = TRUE;
    $thumb['width'] = 90;
    $thumb['height'] = 90;
    
    $this->image_lib->initialize($thumb);
    

    In this way you shouldn’t have any problem.
    If it doesn’t work try to separate the main image and the thumb, you can create the first image and then the thumb with two separata function.

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

Sidebar

Related Questions

hey guys having this really simple problem but cant seem to figure out have
Hey guys, I have a problem with a code that I've been writing. I
Hey guys! I have this little problem: I have one ViewController which adds 2
Hey guys, I have a problem (again). This time I am trying to use
Hey guys, I have this piece of jquery code: <script type=text/javascript > $(function() {
hey guys, i have very small issue please see the code below // this
Hey guy i have following problem: I have this line of code which includes
Hey guys, I have this code within a function inside a class that is
Hey guys I simply cannot get this to work. I have some content that
Hey guys, this is simple but I can't make it workn... blah! I have

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.