Jump to content

Image sizes


ayz1

Recommended Posts

An easy way (i.e. doesn't require code edits) is to make sure all my images are the same size using a free utility program such as FastStone Resizer.

Using the advanced options, it is super easy to resize entire directories full of images with the added bonus that it also tends to dramatically reduce file size which is important for website images.

Couple that with an image importer script and you can have all your images updated in just a few minutes.

fsresizer.jpg

Link to comment
Share on other sites

Thanks for that seems like a handy utility to have. What I am hoping to achieve is to make the image frames all the same size with a white background and center the images vertically and horizontally within the frame. The images sizes are OK as they are as there does seem to be some sort of automatic resizing going on when the thumbnails are created.

Link to comment
Share on other sites

As long as the source images are bigger than the largest size defined (in the skin's config.xml file), CubeCart make them smaller to for each size defined.

That is, if the skin's config.xml file has a definition that makes an image 600 pixels, then be sure to upload at least a 600 pixel image.

But here's the part that most seem to not realize - the image variants will be created so that the longest side of the image is that length. That means, a 700x210 pixel image will get resized to 200x60 (if there is a definition for a 200 pixel size), which is wide and short, and a 210x700 pixel image will get resized to 60x200. which is tall and narrow  - because it is important to maintain the "aspect ratio".

What does not happen is that the 700x210 and 210x700 images both are resized to 200 wide -- 200x60 and 200x667. It is obvious that a 667 pixel tall image is not going to fit in a box that is 200x200 pixels

Included with Foundation is a plugin called the Equalizer. Properly used, it will make sure each product panel is the same height regardless of the height of the image in that panel, and that the price and form controls (quantity and "Add to Basket" button) are at the same location in each panel.

Other CCS tricks can be employed to make sure the image is centered within the container that holds it.

It is your need to use these CSS tricks to make sure the images show in the middle and center of the container. That trick is to apply a display:table-cell;vertical-align:middle;" style to the container.

Also, you may want to adjust the size of the font in the panels, as this is twice as big as they need to be.

 

Link to comment
Share on other sites

Many thanks for the info bsmither. Will play about with it and see how I get on. I have it almost there but can't get the image to move from the top of the container to the middle. Think I will need to set a new class and try it with that as getting some odd results when I change the existing one as it is used in other sections of the page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...