Try this:
2. Replace contents of skin1\product_thumbnail.tpl with
Code:
{* $Id: product_thumbnail.tpl,v 1.19 2005/11/17 06:55:36 max Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y"}{if $tmbn_path_p ne ''}{thumb file=$tmbn_path_p type=2 html="style='margin:5px;' alt='$product'" addgreytohint="false" width="$tmbn_width" height="$tmbn_height" extrapolate="false" link="$tmbn_link"}{elseif $tmbn_path_t ne ''} {thumb file=$tmbn_path_t type=2 html="style='margin:5px;' alt='$product'" addgreytohint="false" width="$tmbn_width" height="$tmbn_height" extrapolate="false" link="$tmbn_link"}{else}<img{if $id ne ''} id="{$id}"{/if} src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&id={$productid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} style="margin:5px;" alt="{$product|escape}" />{/if}{/if}
When they changed the forum over, the img tags got messed up in the forums.
Also, this was done in 4.1.0, not 4.0.17. The SQL code is probably different.