CodeIgniter Forums

Full Version: Image Manipulation Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi All,

I am trying to pull a path to an image from a database and resize said image to display on to the page. I have looked at the gd2 library but it seems that you can only save a copy to your server and use it from there instead of creating it 'on the fly'.

Has anyone got any ideas/opinions on this topic?



El Forum

Generating images on the fly is generally a bad idea. It is a complete memory hog.

A 'better' way is to resize images on upload. If you need multiple sizes, store multiple versions. Check out the image library in my signature, if you want.

El Forum

I had done that in a previous project but was just wondering if there was any way of generating them on the fly in order to avoid saving another image on the server, however small it may be.

Thanks for your advice.