Lynn Rey Lynn Rey - 4 days ago 5
PHP Question

Php working with Images

I have a php web application which has a gallery.

This gallery uses justified javascript.

Then it uses timthumb.php to resize the images without saving the images in the server.

i would like to know which one would be better..


  1. Loading all the images using timthumb.php

  2. Or saving resized images in the server cache folder and loading all
    the images from the cache folder.



I have tried these two methods. Strangely 2nd method is slower than first for the first load.

Thank you for all the help.

Lynn

Answer

Honestly I do not have much idea about timthumb.php.

Although saving the photos in a server cached folder seems to be a better idea, You can save the save the path of the image in your datasource (normally a relational database) , and then while retrieving the photos , extract it from cached folder.

It might be a possibility that your cache is getting reloaded time and again and thats why taking sometime in the first load.

Comments