⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


amipax

Member Since 08 Oct 2012
Offline Last Active Dec 21 2013 12:14 AM
-----

#7359 Image crud custom thumbnails size & path

Posted amipax on 13 May 2013 - 12:43 AM

Hi buddies,

 

  I'm successfully using image crud to upload my image files,  I need to have 1 custom size for my thumbnails of 210 in width and 140 in height. i also want to save the thumbnails in a folder called thumbnails in the same directory where original images are saved.

 

 assets/uploads  <-- original images reside here 

 assets/uploads/thumbnails <-- thumbnails reside here

 

  i found this inside the image_crud library

    protected function _create_thumbnail($image_path, $thumbnail_path)
    {
        $this->image_moo
            ->load($image_path)
            ->resize_crop(90,60)
            ->save($thumbnail_path,true);
    }

should i change values inside the library ->resize_crop(210,140)  or there's another way to it?

how do i assign the thumbnails path ?

 

thanks in advance