How to Resize Image and Create Thumbnail in CodeIgniter

Hi! Today we will see how to resize image and create thumbnail in codeigniter . This comes handy when you want to resize user avatar or profile images. Generally, shopping sites employ this method. Although they upload large product images, they'll create a thumbnail version of them and lists them in several categories. This will not only save bandwidth but load the page faster and listing more items in a limited space. We are going to see how to do this in codeigniter. CI offers a very useful image manipulation class called image_lib which we are going to use for resizing the image. Using this library you can not only change the size but perform crop, rotate and watermark images. It is compatible with all major image libraries like GD/GD2, ImageMagick and NetPBM and we will use GD2 here. CodeIgniter - Image Resizing and Creating Thumbnail Image: Let's build a CI demo to implement image resizing and the process goes like this. The user uploads images using the upload for...