bennyhill Posted April 10, 2008 Posted April 10, 2008 Hi Guys, I am experiencing some broken images on my oscommerce site. As an example, in my special offers section i have two products displaying. One of the products displays perfectly including image and all details. The other product image is missing. When i right click the broken image i see its path as http://www.mysite.com/product_thumb.php?im...w=100&h=127 if i click the image and view the product the large image is also broken, i can see the alt text.... The image which is working has the path http://www.mysite.com/product_thumb.php?im...;w=100&h=90 if i click this image the larger image on the product info page works. I have checked that my image exists and have even uploaded a new one, i can access the image which is broken by typing www.mysite.com/images/myimage.jpg so i know that the image is there and is working, so why is it not displaying on my page? I have this on about 5 of my products (out of 60+) Any Ideas?
Guest Posted April 10, 2008 Posted April 10, 2008 Some thumbnail contributions handle jpg's and not gif's. Read the install instructions and see what types are excluded and / or go through product_thumbs.php and it should be quite obvious how to change it.
bennyhill Posted April 23, 2008 Author Posted April 23, 2008 Hi Java Roasters, Unfortunately i cannot find the cause, My product_thumbs.php reads (relevant section from what i can tell) // Create appropriate image header: if ($image[2] == 2 || ($image[2] == 1 && $gif_as_jpeg)) { header('Content-type: image/jpeg'); if ($tn_server_cache) $filename = modify_tn_path($_GET['img'] .'.thumb_'.$_GET['w'].'x'.$_GET['h'].'.jpg'); } elseif ($image[2] == 1 && function_exists('imagegif')) { header('Content-type: image/gif'); if ($tn_server_cache) $filename = modify_tn_path($_GET['img'] .'.thumb_'.$_GET['w'].'x'.$_GET['h'].'.gif'); } elseif ($image[2] == 3 || $image[2] == 1) { header('Content-type: image/png'); if ($tn_server_cache) $filename = modify_tn_path($_GET['img'] .'.thumb_'.$_GET['w'].'x'.$_GET['h'].'.png'); } // If you are required to set the full path for file_exists(), set this: // $filename = '/your/path/to/catalog/'.$filename; if (file_exists($filename) && $tn_server_cache && filemtime($filename) > filemtime($_GET['img'])) { // Output Cache Headers http_headers($filename); if ($image[2] == 2 || ($image[2] == 1 && $gif_as_jpeg)) { $src = imagecreatefromjpeg($filename); imagejpeg($src, '', $jpeg_quality); } elseif ($image[2] == 1 && function_exists('imagegif')) { $src = imagecreatefromgif($filename); imagegif($src); } elseif ($image[2] == 3 || $image[2] == 1) { $src = imagecreatefrompng($filename); imagepng($src); } else { // Not an image or imagecreatefrom...-function does not exits. // Let's output an error http_headers(); } I have multiple product images in .gif and .jpg, all bar a few are working. I cannot seem to add new images either. I have recently installed some updates and made some changes on my site. the largest change has been moving oscommerce from www.mysite.com/directory to www.mysite.com i have installed Chemo's Ultimate Search Engine Friendly URLs and cDynamic Meta Tags aswell as adding google analytics and google sitemap... Any help much appreciated?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.