Community Add-Ons

Add file to this package
Top » Images

'On the Fly' Auto Thumbnailer using GD Library
for osCommerce Online Merchant v2.2

This modification uses the GD 2 image library, which now comes packaged with most PHP builds, to dynamically generate your product image thumbnails on the fly. It works with GIFs, JPGs and PNGs, produces much smaller thumbnail file sizes (saving bandwidth), maintains the proper ratio of your pics, and does not create any extra files on your server.

Easy installation involves adding only one file and updating the tep_image function. It should work with osC 2.1-2.2

Unfortunately, transparencies are not supported as of this release. GIF creation was disabled in the GD Library due to licencing issues with Compuserve (Gifs are thumbnailed as JPGs), and I haven't got the PNG transparencies quite worked out.

Legend:  Download   Report

Expand All / Collapse All

Update for PHP 5.4 10 Feb 2015  

product_thumb.php updated to work under php 5.4 (and hopefully higher). The change from 5.3 to 5.4 caused the function imagejpeg() to fail. In particular, the second parameter would no longer accept "" in place of null:

original calls:
imagejpeg($src, '', $jpeg_quality);

changed to:
imagejpeg($src, null, $jpeg_quality);

Modified version of product_thumb.php attached.

timthumb 2.7 for oscommerce 14 Aug 2011  
minor fix 23 Mar 2011  
'On the Fly' Auto Thumbnailer using GD Library and timthumb 19 Mar 2011  
minor fix 11 Feb 2011  
On the fly Auto Thumbnailer 2.4 fix 4 26 Oct 2008  
On the fly Auto Thumbnailer 2.4 fix 3 + Trucolour/better resampling for GIF better GIF transparency support + minor palette fix 7 Sep 2008  
On the fly Auto Thumbnailer 2.4 fix 3 + Trucolour/better resampling for GIF better GIF transparency support 7 Sep 2008  
Wrong check for Image Size Calculation 8 May 2008  
Workaround if using Anti-robot 21 Apr 2008  
On the fly Auto Thumbnailer 2.4 fix 3 12 Apr 2008  
On the fly Auto Thumbnailer 2.4 fix 3 12 Apr 2008  
On the fly Auto Thumbnailer 2.4 fix 2 12 Apr 2008  
On the fly Auto Thumbnailer 2.4 fix 13 Mar 2008  
On the fly Auto Thumbnailer 2.4 2 Mar 2008  
Default Image bug 6 Feb 2008  
Not to pixelate larger images 13 Jan 2008  
Default image upgrade 29 Dec 2007  
manufacturer image fix 8 Oct 2007  
Minor Change for W3C capability 26 Sep 2007  
v2.3a 22 Aug 2007  
security hole 17 Aug 2007  
2.3.2 Full Package + updated readme 26 Jul 2007  
2.3 Full Package + minor readme text adjustment 24 May 2007  
2.3 Full Package 28 Apr 2007  
2.2.2 Catalogproduct_thumb bug fixed 14 Apr 2007  
2.2.1 Minor Admin Update (SQL Only) 25 Mar 2007  
2.2 Full Package with Admin 23 Mar 2007  
Backend patch 12 Mar 2007  
BMP and '&' fix 11 Mar 2007  
Control compression of thumbnailed images 29 Oct 2006  
A little tip: Default image 9 Apr 2006  
auto create thumbnail dir and win32 pathSep 25 Feb 2006  
bugfix 4 Feb 2006  
2.1.2b Minor Bugfix with wacky filenames 5 Jan 2006  
'On the Fly' Auto Thumbnailer v 1.5 15 Dec 2005  
Instruction Correction for installations on osc2.2 M2 3 Nov 2005  
2.1.2a - Fixing Problems with ADMIN Tool thumbnailiing 10 Sep 2005  
2.1.2 minor bugfix, restyling and better browser-caching mechanism 19 Aug 2005  
2.1.1 readme updated 13 Aug 2005  
2.1.0 new feature: optional sub-directory for cached thumbnails 10 Aug 2005  
2.0.1 bugfix for 2.0.0 10 Aug 2005  
2.0.0 new feature: browser caching 10 Aug 2005  
1.9.2 Full Package 29 Jul 2005  
trans_pixel fix 19 Jul 2005  
trans_pixel fix 19 Jul 2005  
1.9.1 Full Package 6 Jul 2005  
Fix of v 1.9 (full package) Max Brezzi 25 Jun 2005  
Bugfixes, complete package V 1.9 Marc Gutt 23 Jun 2005  
Fix for small thumbs being scaled by browser IMG WIDTH and HEIGHT attributes. Tony Briers 22 Jun 2005  
Bugfixes and new features, complete package Rémi Letot 4 Jun 2005  
Bugfix for gif images - 1.7.2 Rémi Letot 4 Jun 2005  
All updates combined - 1.7.1 Sean Scarfo 21 May 2005  
validation update Giles Westwood 20 May 2005  
'On the fly' Auto Thumbnailer in Admin Section (also SSL protected) Dmytro Kavchak 14 Mar 2005  
1.6 Pallieter Koopmans 5 Nov 2004  
'On the Fly' Auto Thumbnailer with Cache option Marcello Colaruotolo 19 Sep 2004  
'On the Fly' Auto Thumbnailer v 1.5 Nate Welch 16 Sep 2004  
Caching Roberto Ghizzi 26 Aug 2004  
Caching Roberto Ghizzi 26 Aug 2004  
'On the Fly' Auto Thumbnailer v 1.1 Nate Welch 7 Jul 2004  
Auto Thumbnailer Rick 5 Jul 2004  
Resampled thumbnails "product_thumb.php" Nate Welch 4 Jul 2004  
Concerns... Rick 2 Jul 2004  
'On the Fly' Auto Thumbnailer using GD Library Nate Welch 1 Jul 2004