Welcome Guest, Not a member yet? Register   Sign In
Best way to deal with image thumbnails on news web site (CMS)?

[eluser]Rok Biderman[/eluser]
I used "on the fly method" on a gallery site and it was working well on testing but was a nightmare on live (60 requests to a script for each page refresh). What I did was what incidentally also Wordpress uses - Timthumb. You still have to set the upper limit and resize according to ratio (I can go look up the methods if you need them) to get any kind of sane image sizes and you'd probably have to preg_replace all those hard to display signs with an underscore.

After that use Timthumb to resize/crop the images to your size. It has a lot of options (you can also apply some basic filters and sharpen thumbnails which makes them look better). This way you can also change size/ratio at a later time without reuploading. It also handles caching (for 7 days by default I think) so it's going to be snappy comparing to the dynamic resizing. Now, if you Google Timthumb you're probably find out it has a rotten security reputation (one of the biggest WP hacks was through an outdated Timthumb plugin), but it's since been rewritten from scratch and it seems to be perfectly safe. I don't really know what Drupal uses, but that one is usually so slow I think the Leprechauns draw it by hand.

The only case when I'd use the "on the fly" from CI image manipulation lib would be if I had some special css in which I'd fill the whole screen with an image or something similar. Not on a large scale and especially not if you're planning for the site to have any kind of traffic. Considering that you can't cache partials with native CI caching, you'd have to write something on your own.

Messages In This Thread
Best way to deal with image thumbnails on news web site (CMS)? - by El Forum - 11-10-2012, 10:38 AM

Theme © iAndrew 2016 - Forum software by © MyBB