Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is it Possible to Resize prodcut images?


thrion

Recommended Posts

The images I use for my products all very in size (dimension). In the admin section, you can set how big you want the images to appear, which works great, but can sometimes cause the initial image to look distorted.

 

Is there a way to (for example) set the width to always be 100, and then let the hight readjust in the same proportions as the original file automatically?

Link to comment
Share on other sites

Images can be whatever size you want them to be. What images are you looking to make larger? Just the products images?

 

 

Creat your product image in whatever size you want the large image to be [but keep in mind that they will only be reduced for the thumbnail so you don't want your pages to take forever to load].

 

the pop up window will size to whatever size your image is.

 

the thumbnail will need to be edited in the ADMIN features under configuration>images

Link to comment
Share on other sites

i think what chris and shawn are looking for is a mod that will allow the thumbnails to maintain proportion. 1.5:1 or 3:1 instead of always 1:1

 

take a look in the contributions, i'm sure there is something posted.

Link to comment
Share on other sites

i think what chris and shawn are looking for is a mod that will allow the thumbnails to maintain proportion. 1.5:1 or 3:1 instead of always 1:1

 

take a look in the contributions, i'm sure there is something posted.

That's exactly what I'm talking about. :)

 

I know I can change the default size in the admin, but my sizes are all different. If I change to fit one, the rest will look strange.

 

I've looked through all of the images mods, and am about to start plowing through the others to see if I can find something close.

Link to comment
Share on other sites

Hey Everybody,

 

This is my last post for the night, long day.

 

Anyways, I found what you?re looking for. Follow this URL:

 

Contributions - Automatic Thumbnail

 

Tested it myself, works pretty good. Couple things though:

 

1. If all of your images (and text) disappear, just undo (or do) instruction number 6. If you removed ?GIF?, replace it or vice-versa.

 

2. Make sure your thumbnails do not exceed your max (height or width) value, or they won?t show.

 

Hollice

Link to comment
Share on other sites

If I understand the question correctly, what you will need to do is set one of the image size values to 0 (zero). For example, if you want all of your thumbnail images to be 100 pixels wide and the height to automatically adjust so the image aspect ratio doesn't change, set image width to 100 and image height to 0.

 

On the site I'm working on now, I went even further ... I set the thumbnail width and height to 0, then made real thumbnail images using the batch function with a script in PaintShop Pro. The script sets the images max width or height to 100. Which ever dimension value is bigger is changed to 100 and the image is resized to keep the aspect ratio. Next, I modified oscommerce to show a second (big) image when the thumbnail is clicked. (This change is very similar to at least one of the contributions available.) I made this change to reduce page load times. (There is no need to load a lot of huge product images if the visitor is not going to view all of the images in their full size.)

Link to comment
Share on other sites

If I understand the question correctly, what you will need to do is set one of the image size values to 0 (zero). For example, if you want all of your thumbnail images to be 100 pixels wide and the height to automatically adjust so the image aspect ratio doesn't change, set image width to 100 and image height to 0.

 

On the site I'm working on now, I went even further ... I set the thumbnail width and height to 0, then made real thumbnail images using the batch function with a script in PaintShop Pro. The script sets the images max width or height to 100. Which ever dimension value is bigger is changed to 100 and the image is resized to keep the aspect ratio. Next, I modified oscommerce to show a second (big) image when the thumbnail is clicked. (This change is very similar to at least one of the contributions available.) I made this change to reduce page load times. (There is no need to load a lot of huge product images if the visitor is not going to view all of the images in their full size.)

Mind making that into a contribution? :P

Link to comment
Share on other sites

If I understand the question correctly, what you will need to do is set one of the image size values to 0 (zero). For example, if you want all of your thumbnail images to be 100 pixels wide and the height to automatically adjust so the image aspect ratio doesn't change, set image width to 100 and image height to 0.

This worked like a champ...exactly what I was trying to accomplish. Thanks so much!

Link to comment
Share on other sites

That contribution does not seem to work for me. Section 3 seems to cause problem. When I put that section in as instructed in the contribution, there is not anything display in my page apart from the header. I don't know why.

Link to comment
Share on other sites

Mind making that into a contribution?  :P

My changes were based on a thumbnail modification in the contributions area. I don't remember which one I used, but I remember I didn't follow it verbatim because it was simple enough that I just needed to be pointed in the right direction. Search for "big_image"

 

 

Thanks berkedam, I forgot that "calculate image size" needs to be enabled as well.

Link to comment
Share on other sites

An easy way of showing a thumbnail in the product listing but the full sized image in the product page is to go into product_info.php, find SMALL_IMAGE WIDTH and SMALL_IMAGE_HEIGHT and simply delete them (BACK UP FIRST!!!!).

 

Then this will just show the image in it's original size.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...