CodeIgniter Forums

Full Version: multiple image resize
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]syntax error[/eluser]
Hi There

I am experiencing some inconsistency with regards to multiple image manipulation.
I offer my users a gallery with their user account, where they can upload multiple images.

They have the option of uploading multiple images in one go. My programming approach is to firstly upload all the images, then loop through the uploaded images creating thumbnails and resizing them. For the most part this logic works fine, but it seems randomly an image will not get resized.

I was wondering if there are any full-proof methods to ensure that ALL images are resized correctly using the CI image lib.

Any suggestions would be greatly appreciated.
Thank you.

El Forum

[eluser]Michael Wales[/eluser]
We noticed the same in a project we were working on. Make sure you always unset() the configuration array at the beginning of the loop and define the '_thumb' appendage (even if you are using the default).

That fixed the bugs for us.

El Forum

I know it's a little late, but for the sake of others that come across this in a search I felt I should also comment.

There's a built in function in the Image Manipulation Class that resets all of the values used when processing an image. Using that and then reinitializing the config should do the trick


Might make things a little easier than doing it manually. Found this at