Jump to content

Recommended Posts

Hi,

sorry for my english and thank you for any reply.

I've a problem with resize of image in the products.

This image was imported from external link with csv import, but in many product the image is very big.

Are there any method for resize automatically this image?

i've attach the screen of the problem.

 

Thank you

Piero

big_image.tiff

Link to comment
Share on other sites

Can you paste here the <img> code from your .tpl file?

sum4444 thx for response.

 

 

<!-- product img-->

<div id="image-block">

{if $have_image}

<span id="view_full_size">

<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />

<span class="span_link">{l s='View full size'}</span>

</span>

{elseif $product->supplier_reference|substr:0:5=='http:'}

<a href="{$product->supplier_reference|escape:'htmlall':'UTF-8'}" class="thickbox"><img src="{$product->supplier_reference|escape:'htmlall':'UTF-8'}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" /></a>

{else}

<span id="view_full_size">

<img src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg" id="bigpic" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" />

<span class="span_link">{l s='View full size'}</span>

</span>

{/if}

</div>

 

in the backoffice standard resize image is called large_default

 

wait your info

Link to comment
Share on other sites

if all is ok in your admin panel->preferences->images, I mean images with the name thickbox_default, mean that your problem is in ProductController.php, you can display your images by deleting height and width attributes from <img> tag. Below you can see code

 

change

<img src="{$product->supplier_reference|escape:'htmlall':'UTF-8'}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />

to

<img src="{$product->supplier_reference|escape:'htmlall':'UTF-8'}" id="bigpic" />

Link to comment
Share on other sites

i've change the line in product.tpl (becouse productcontroller.php there aren't any same line) but don't change nothing.

The image was loaded in website with csv using module prestashop wide import but don't know why this image are big.

thank you

Link to comment
Share on other sites

  • 4 years later...
On 26. 6. 2013 at 3:21 PM, smoothness89 said:

i've changed <img src="{$product->supplier_reference|escape:'htmlall':'UTF-8'}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" with manual width and height (254px) and i've solved the problem.

Thank you all!!

 

 

HY

I whitch file you change that? I have search in product.tpl but i didnt find it. 

THX for reply

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...