[eluser]pickupman[/eluser]
You can use a simple image controller to do this with the [url="http://ellislab.com/codeigniter/user-guide/libraries/image_lib.html"]Image Library[/url]. I have done something like this:
Code:
class Image extends CI_Controller
{
public function index($width = 100, $height = 100, $image_path)
{
$config['image_library'] = 'gd2';
$config['source_image'] = $image_ath;
$config['dynamic_output'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = $width;
$config['height'] = $height;
$this->load->library('image_lib', $config);
echo $this->image_lib->resize();
}
}
//Call from view
<img src="image/100/100/my-image.jpg" alt="" />
Using the image class is pretty simple to write a resize or crop image handler.