milesj/cake-uploader — Issue #32: save images in differents image sizes
Author: edap
Created: 2011-12-13 12:06:26+00:00
State: open

I would like to save an image in attachment to my Article in 3 formats. main, thumb, and slideshow
To do so, i've added the following lines in my Uploader.Attachment array in the Article model

'transforms'	=> array(
array('method' => 'resize', 'width' => 370, 'append' => 'slide', 'dbColumn' => 'image_slide'),
array('method' => 'resize', 'width' => 180, 'append' => 'thumb', 'dbColumn' => 'image_thumb'),
array('method' => 'resize', 'width' => 674, 'append' => 'main', 'dbColumn' => 'image')
),

and I've added the related columns name in my database.

The problem is that only the first transformation works (image slide). For this transformation there is the uploaded file and the corrected value in the database, /files/uploads/myimageslide.jpg.

For the other two transformations, there is only the path in the db, that is incorrect because it is absolute and not relativ like the first one.

I'm using the version 3.1 on cake 2.0.3