CodeIgniter Forums
Image_Lib : Saving Thumbnail to another directory? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Image_Lib : Saving Thumbnail to another directory? (/thread-11165.html)



Image_Lib : Saving Thumbnail to another directory? - El Forum - 08-28-2008

[eluser]garaget[/eluser]
Hey guys,

I am somewhat of a nub to using this library. I see the way to set the source of the file you want to work on but I don't see anyway to set the directory or file that I want to write the file to?

//Source file
Code:
$config['source_image'] = 'directory/directory/file.jpg';

Is there a config setting where I can set where the file is going to?

Thank you for your time and efforts in advance.


Image_Lib : Saving Thumbnail to another directory? - El Forum - 08-28-2008

[eluser]gtipete[/eluser]
from the userguide...

Creating a Copy
The resizing function will create a copy of the image file (and preserve the original) if you set a path and/or a new filename using this preference:
Code:
$config['new_image'] = '/path/to/new_image.jpg';

Notes regarding this preference:
If only the new image name is specified it will be placed in the same folder as the original
If only the path is specified, the new image will be placed in the destination with the same name as the original.
If both the path and image name are specified it will placed in its own destination and given the new name.


Image_Lib : Saving Thumbnail to another directory? - El Forum - 08-29-2008

[eluser]garaget[/eluser]
Thanks Gtipete, I don't know how I could've missed that.