Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

'On The Fly' Auto Thumbnailer using GD Library 2.1


mloeffen

Recommended Posts

  • 3 weeks later...
  • Replies 556
  • Created
  • Last Reply

Top Posters In This Topic

I recently switched hosts (to hostgator). Since then when I upload new images the thumbnails become very fuzzy. The images that I uploaded before switching still look pretty normal, although some look kinda bad as well (still no fuzzy though). See picture below:

 

fuzzyqg0.th.jpg

 

You can see the top 3 thumbnails are blurry, however the full images look normal. (see popup) Anyone know what could be causing this and how to fix?

Link to comment
Share on other sites

I recently switched hosts (to hostgator). Since then when I upload new images the thumbnails become very fuzzy. The images that I uploaded before switching still look pretty normal, although some look kinda bad as well (still no fuzzy though). See picture below:

 

fuzzyqg0.th.jpg

 

You can see the top 3 thumbnails are blurry, however the full images look normal. (see popup) Anyone know what could be causing this and how to fix?

Maybe your new host has a different gd library version installed? You might try setting both $use_resampling and $use_truecolor to true in product_thump.php. If that doesn't help, try setting $gif_as_jpeg to true.

 

After making your changes, don't forget to delete the thumbnails, otherwise you still see the old ones.

Link to comment
Share on other sites

I have the same issue as Annkay had...

 

I have read the entire thread and still I am lost.

 

I have installed this contribution to the letter, even wiped and started over again when it wouldn't work the first time, but it still won't work. I did the thumbnail folder tricks and anything I have found here, but my thumbnails still won't show.

 

PHP Version: 5.0.5

osCommerce: 2.2-MS2

GD Version: bundled (2.0.28 compatible)

 

I read this entire thread for help, but still see no images on my site. I see where the images should be, and they are sized correctly, but the image doesn't show and I see no saved thumbnail in the directory. I'm sure I'm missing something incredibly stupid, but can someone please help? Store is supposed to be live already. The site is www.wiccanstone.com

 

The image url seems correct:

http://www.wiccanstone.com/product_thumb.p...;w=92&h=100

 

or isn't it?

Link to comment
Share on other sites

I have the same issue as Annkay had...

 

I have read the entire thread and still I am lost.

 

I have installed this contribution to the letter, even wiped and started over again when it wouldn't work the first time, but it still won't work. I did the thumbnail folder tricks and anything I have found here, but my thumbnails still won't show.

 

PHP Version: 5.0.5

osCommerce: 2.2-MS2

GD Version: bundled (2.0.28 compatible)

 

I read this entire thread for help, but still see no images on my site. I see where the images should be, and they are sized correctly, but the image doesn't show and I see no saved thumbnail in the directory. I'm sure I'm missing something incredibly stupid, but can someone please help? Store is supposed to be live already. The site is www.wiccanstone.com

 

The image url seems correct:

http://www.wiccanstone.com/product_thumb.p...;w=92&h=100

 

or isn't it?

 

Nevermind, after clicking on the image link and reviewing the error log, it turned out it was a permissions error. I'm only posting this so others, like me, who read this file and have the same issue know what my problem was. I had to reset the permissions on the product_thumb.php to 755.

Link to comment
Share on other sites

  • 3 weeks later...
hey,

 

i've installed this nice contrib, works superb on the catalog side, it also works on the admin side, but not all the way. Some images in admin are missing (like the 'online catalog'-image on the right top corner in admin) and there are no flags visible, e.g. on the edit-pag of a product at Products Name.

 

i read the whole topic, there is no word or info on this problem

 

Hello,

 

I'm having exactly the same problem. I've also read ALL these posts and tried the fix on the first page but no go! Does anyone know how yet??

Link to comment
Share on other sites

Why don't you look just above your post :lol:

 

Ok after reading 11 pages late at night my vision was getting a little foggy :D

 

I just tried the above "my post" method but no such luck. I thought chmod 755 was for folders? But anyways I tried 706 too and no go. I don't think it's permissions with me. I think it's got something to do with the html_output.php code inserted in the admin section.

 

The shop front end works great so I could live with this! The picture results are amazing!! In other words I've moved on from this. BUT if anyone does know a know-how please private message me :thumbsup:

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
i have many pic upload already, and i don' want to upload again:(

There is no need to re-upload the images again. The add-on will take care of that.

 

my other question is, i'm using the mod Dynamic Mo Pics 3.0, and have changed the pic size in product_info.php, it can work well too?

I'm not quite sure if they are compatible. The latest Dynamic MoPics also does something with showing different size images, but you need to upload those seperately. You could install both contributions in a temporary demo shop and see how they react to one another. First install Dynamic MoPics, then the Auto Thumbnailer.

 

Trying to explain the approach of the on the auto thumbnailer contribution: it is being called be the generic function of osCommerce that draws images in your shop. Normally the this oscommerce-function (tep_image) would generate html like <img src="....jpg">, but after the thumbnailer contribution it would generate html like <img src="thumbnailer.php?img=.....jpg&w=80&h=80"> (I don't remember the exact code and I am to lazy to check :P ) Meaning that if the Dynamic MoPics uses the tep_image function for drawing images, it will probably also work for the extra images. Like I said before: to be sure you have to test it on a temporary demosite :thumbsup:

Link to comment
Share on other sites

This contribution works really good but it slows down sites I am working on when opened in IE.

Does anyone know about this?

Does anyone have a solution?

 

Thanks

This can have several reasons: server caching, browser caching and others.

If you want me to have a look, then please send me some urls of these slow sites through PM.

 

Cheers,

Martijn.

Link to comment
Share on other sites

This can have several reasons: server caching, browser caching and others.

If you want me to have a look, then please send me some urls of these slow sites through PM.

 

Cheers,

Martijn.

 

Hi thanks for your interest in helping me with this issue;

 

here are some URL's of slow loading thumnails on Internet Explorer.

ps. they load fine on firefox and AOL

 

www.bestvacuumcleaner.net

 

www.discountperfumeusa.com

 

thanks alot

Link to comment
Share on other sites

Hi thanks for your interest in helping me with this issue;

 

here are some URL's of slow loading thumnails on Internet Explorer.

ps. they load fine on firefox and AOL

 

www.bestvacuumcleaner.net

 

www.discountperfumeusa.com

 

thanks alot

I've looked into it, but there seems nothing wrong with the thumbnailer contrib. If for instance you try this thumbnailed image, it shows up instantly in IE7. Other non-thumbnailed images (as this one) show up fast as well, as long as you view them apart. So *many* images are loading slow from the main page, even the once that do not use the thumbnailer contrib. I think you have to look elsewhere for a possible reason (another oscommerce contrib, a webserver module, bandwidth issues, http-connection issues or whatever).

 

Good luck!

Link to comment
Share on other sites

  • 1 month later...

I've been adding some new products to my web site www.pagan-magic.co.uk/shop - every now and then the thumbnails that are generated (I have On The Fly installed) look odd. If you take a look at the following items on the homepage you'll see what I mean: Silver Book Box and Pentacle Ashtray.

The thumbnails lack colour and detail, the correct picture is displayed when you go into the product information page and click on Enlarge.

 

I assume that this error is occuring when the thumbnails are generated.

Link to comment
Share on other sites

I've been adding some new products to my web site www.pagan-magic.co.uk/shop - every now and then the thumbnails that are generated (I have On The Fly installed) look odd. If you take a look at the following items on the homepage you'll see what I mean: Silver Book Box and Pentacle Ashtray.

The thumbnails lack colour and detail, the correct picture is displayed when you go into the product information page and click on Enlarge.

 

I assume that this error is occuring when the thumbnails are generated.

 

Hi all,

 

I tried installing version 2_1_2 with limited success. My shop is in the root - no catalog folder I managed to get the thumbnails saved to the images directory by not specifying a separate folder to store them in in product_info.php. - I still couldn't get it to save in the thumbnail folders - do you have to do something differently when your not using the catalog paths?

 

1) I also found that the thumbnail created was a lot bigger than the thumbnail created by version 1.5 - why is this and can it be changed?! For example my image on product_info was 2/3 times the size than with using V1.5.

 

2) i also couldn't make it work in admin.

 

Many Thanks

 

Becki

Link to comment
Share on other sites

I managed to get the thumbnails saved to the images directory by not specifying a separate folder to store them in in product_info.php. - I still couldn't get it to save in the thumbnail folders - do you have to do something differently when your not using the catalog paths?

Make sure the folder is writable by the auto thumbnailer script.

 

1) I also found that the thumbnail created was a lot bigger than the thumbnail created by version 1.5 - why is this and can it be changed?! For example my image on product_info was 2/3 times the size than with using V1.5.

Maybe in the newer version some quality setting is set to true by default, where it wasn't in a previous version. It also depends if you changed the product_info.php so that it displays the thumbnail twice as large as on the frontpage.

 

2) i also couldn't make it work in admin.

Please read the manual that comes with the contribution and read it thouroughly.

Link to comment
Share on other sites

I've been adding some new products to my web site www.pagan-magic.co.uk/shop - every now and then the thumbnails that are generated (I have On The Fly installed) look odd. If you take a look at the following items on the homepage you'll see what I mean: Silver Book Box and Pentacle Ashtray.

The thumbnails lack colour and detail, the correct picture is displayed when you go into the product information page and click on Enlarge.

 

I assume that this error is occuring when the thumbnails are generated.

This seems as if it's related to the original image. Open these images in an image-editor and resave them. That might improve the quality for the tumbnails.

Link to comment
Share on other sites

Make sure the folder is writable by the auto thumbnailer script.

Maybe in the newer version some quality setting is set to true by default, where it wasn't in a previous version. It also depends if you changed the product_info.php so that it displays the thumbnail twice as large as on the frontpage.

Please read the manual that comes with the contribution and read it thouroughly.

 

Firstly thank you for the answers...

 

I will try again with the thumbnail folders - am I right in saying I have to have a thumbnails folder in every sub folder within images or else it won't work OR it will only cache ones that have a folder - i.e having cache on but no thumbnail - will that just mean on the fly every time or will it not work at all?

 

I has truecolour and resample and everything the same i thought. But it was definately alot larger.

 

Thanks

 

Becki

Link to comment
Share on other sites

I will try again with the thumbnail folders - am I right in saying I have to have a thumbnails folder in every sub folder within images or else it won't work OR it will only cache ones that have a folder - i.e having cache on but no thumbnail - will that just mean on the fly every time or will it not work at all?

The folder structure should be documented in the readme. If I recall it right, the thumbnail-path ($tn_path) you specify in the auto thumbnailer script is appended to the path of the image. So if your image filename is /catalog/images/mypic.jpg then the to be created cache-folder should be /catalog/images/thumbnails.

 

The original (read first) version of the thumbnailer did not have a caching mechanism. Every thumbnail for an image was created at runtime (whenever it was requested by a visitor/browser) over and over again. Someone added the server-caching that caused the thumbnail-images to be stored (cached) on the webserver, so the thumbnailer script had to create the thumbnails just once. After that I added browser-caching. That's a mechanism enabling a browser to detect whether the thumbnail has changed since the last time it was viewed/downloaded from the webserver. If it hasn't changed, the browser will get the thumbnail from it's own cache (e.g. c:\documents and settings\username\temporary internet files), probably saving lots of bandwidth. If the thumbnail did change from the last time, it will redownload the thumbnail from the webserver. Server-caching and browser-caching can be enabled and disabled independant from one another. Hope this clarifies some questions you have.

 

Cheers,

Martijn.

Edited by mloeffen
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...