Jump to content
Larry Ullman's Book Forums

Website Images :: Yii-Easyimage


Edward
 Share

Recommended Posts

I have a website which in the future may have more than a million images on it :) (I HOPE SO). Images would be presented in four different sizes ranging from 100px up to 600px +.

 

Should i save four separate images for an item so i could load the size required. (This is what i actually coded already).

 

Or should i use the yii easyimage extension which inplements the kohana image library and enables you create each size of image you want on the fly?

 

May be the answer to this question would be different if i had 1 million members!!

 

I know you are a busy buy Larry but i need your advise, the things you have taught me already are considerably shortening my development time. I'm going to be there soon i can feel it.

 

 

Link to comment
Share on other sites

Thanks Larry, that is what i originally coded, now i am going back to recode my item listing page and make it ajax submission only.

 

I have also enabled csrf token on my site recently which caused me a major problem with my SWFUpload flash uploader which i landed up taking 6 hours to figure out the problem. Even though i had no form in my script it was still necessary to pass the csrf token in yii. In the end it turned out it was so easy to fix and all that for 6 hours work, i really thought i was going to have to make a post here but just after i thought that about that, that's when i got it, ahhhhhhhh! -_- (Just one of those days, or two days rather.)

 

Thanks for your help im still around...Just busy with my own problems now.

Link to comment
Share on other sites

Edward -

 

Don't create the sizes on the fly It's brutal for CPU utilization. I have had to fix up a few old Wordpress sites that relied on autosizing the images with timthumb.php. After removing that option to autosize images on the fly cpu's became quite even with the caching that it had.

 

One other area to watch out for on some autosized images is that file size will become larger after re-sizing. I think this was related to how the resizers are set up for compression and how they do their job. Some seem to convert .jpg to .png  and back to .jpg to do the work and the file sizes with default settings get larger even with smaller image sizes as I recall. 

 

And I'm just learning Yii and have had many of the 6 hour session with the ultimate conclusion wow this was easy once I figured it out :)

 

Sandy

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...