Thumnails are different sizes

  • Posts: 12
  • Thank you received: 0
11 years 4 months ago #110533

Hello,

I have a page with one of my category products on it. The images for the products are all different sizes, I want them all to be 150x188px.

I have set the thumbnail sizes in the content menu to 150x188px. I have also fiddled with image sizes in the configuration.

It looks like hikashop is resizing the images to keep the aspect.

Any help much appreciated! this is driving me insane!! :S

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 4 months ago #110535

Please Log in or Create an account to join the conversation.

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #110542

Hi there,

This behavior is totally normal. Resizing your picture to be exactly 150x188px would make it look ugly and deformed.
What Hikashop is doing is resizing your pictures to create a thumbnail which keep the original ratio, so it make the width or height fit the configuration and resize it.
Therefore, I don't know what you would like for your pictures, make them fit your exact size? Or maybe you would like them to be cropped?
Anyway, both these options aren't easy and it's not said that it will look better.

If you have any question, do not hesitate :).

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 4 months ago #110543

Hello,

thanks for your reply,

would it be possible to crop them all to 150x188?

Please Log in or Create an account to join the conversation.

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #110545

Hikashop cannot do this for now. You will need some good php knowledge and code it by yourself.
According to what I can see on your website I would advise to crop by yourself the first picture (before uploading I mean), it's the only one which has not the same size so making it fit your spec would give you a nice thumbnail.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 4 months ago #110546

Is there a way of making sure they are all the same width or height?

Please Log in or Create an account to join the conversation.

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #110564

You mean on your website? You can do a right click on the picture and click properties.
You can also use the inspect element feature of your browser to check the size of the container.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 4 months ago #110600

Hi,

I mean, is there a way in hikashop to make all the thumbnails the same width or height?

Please Log in or Create an account to join the conversation.

  • Posts: 82758
  • Thank you received: 13346
  • MODERATOR
11 years 4 months ago #110604

That's the case by default. In the configuration of HikaShop, you have image size options where you can set the width/height.
HikaShop will then make sure that the images fits the size that you have there.
So if you have 100*100 (like it is by default), HikaShop will resize the thumbnails to make sure that they fit in that 100*100 rectangle while keeping the ratio of the images so that they don't look distorted.

There is no way to make sure that they are all the same width and height since that would require either to crop them (which HikaShop does not support yet), or to not keep the aspect ratio of the images (which first wouldn't be nice, and second there is no option to deactivate that).

That's why Eliot told you that in that case, you would have to upload images with the same size in the first place.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
11 years 4 months ago #110607

ok thanks,

I just don't understand why the images don't have the same width when I set it. Some do but not all...

Please Log in or Create an account to join the conversation.

  • Posts: 82758
  • Thank you received: 13346
  • MODERATOR
11 years 4 months ago #110610

Because the original images don't have the same width.

If you set a size of 100*100:
if you upload only images of the size 200*200, they will all be resized to 100*100.
if you upload only images of the size 300*200 they will all be resized to 100*67.
if you upload images of the size 200*200 and 300*300, they will all be resized to 100*100 (because they have the same aspect ratio).
if you upload images of different aspect ratios, the will all be resized with different sizes.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum