PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

(SOLVED) image too large in admin

6 replies to this topic
#1
babyewok

    PrestaShop Apprentice

  • Members
  • PipPip
  • 327 posts
When viewing a list of products in a category in the back office, if an image is too wide, the table gets pushed over the edge of the admin area.

I can see that the image in question is ../img/tmp/product_mini_xx.jpg. However, I cannot see where I can set the dimensions for this image.

#2
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
What version of PrestaShop are you using? I thought this issue was fixed in PrestaShop v1.3.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#3
babyewok

    PrestaShop Apprentice

  • Members
  • PipPip
  • 327 posts
version 1.3.1.1

#4
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
You're right. I just tried uploading a very wide photo and the table doesn't display right. So much for it being fixed.

I fixed it by changing line 43 of images.inc.php from:


return '<img src="../img/tmp/'.$cacheImage.'" alt="" class="imgm" />';


to:


return '<img src="../img/tmp/'.$cacheImage.'" width="'.$size.'" alt="" class="imgm" />';


The image will still be too wide, but the browser will resize it to be no more than 45px wide. It might be worth posting this issue on the bug tracker.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#5
babyewok

    PrestaShop Apprentice

  • Members
  • PipPip
  • 327 posts
Thanks that works fine

#6
Thierryh

    PrestaShop Apprentice

  • Members
  • PipPip
  • 109 posts
I got the same issue. The fix provided by Rochy works for me too. Thanks Rochy.

#7
miyuru

    PrestaShop Newbie

  • Members
  • Pip
  • 1 posts

From 1282736326:

You're right. I just tried uploading a very wide photo and the table doesn't display right. So much for it being fixed.

I fixed it by changing line 43 of images.inc.php from:


return '<img src="../img/tmp/'.$cacheImage.'" alt="" class="imgm" />';


to:


return '<img src="../img/tmp/'.$cacheImage.'" width="'.$size.'" alt="" class="imgm" />';


The image will still be too wide, but the browser will resize it to be no more than 45px wide. It might be worth posting this issue on the bug tracker.



man thanks man you rock this fix my problem and my images are now small in admin area thanks alot i owe you one man you rock