News:

Support the VirtueMart project and become a member

Main Menu

Upgraded, medium image is now huge.

Started by pushthepixel, March 23, 2012, 01:01:45 AM

Previous topic - Next topic

hollywooood

If you want any kind of answer at all you need to post your Joomla and virtuemart versions (before and after your migration).

I also have a feeling either a. you didn't set up your virutemart template correctly or b. your settings are not pointing to your virtuemart template..
Joomla 2.5.4
Virtuemart 2.0.6
PHP 5.2.17
MySQL 5.5.21-55
APACHE 2.2.22

atb

There has been quite a lot of discussion on this topic, including Milbo stating  "Please be aware that we did that on purpose. We or better said I want to awake a recognition of the actual image size." - see:
http://forum.virtuemart.net/index.php?topic=97365.msg322276#msg322276

Also in that thread it suggests a solution that makes use of image scaling of "medium-image" via the main site's template.  It is this image definition name that has changed.  I have successfully used this solution in a site that the product image is scaled to about half the size that it is stored and displayed at when wanting the full view.  Scaling via css is deprecated by some people but, IMHO, is a reasonable compromise in certain circumstances.

You may wish to add something like this to your main site template.css:   (vmsite-ltr.css)
.medium-image {width:auto; height:auto; max-width:100%;}   
say, somewhere around line 157, between the .main-image and .additional-image definitions.
Rather than specification in percentage you could use specific pixels  {width.???px;}

pushthepixel

Hey guys

Thanks for the replies!

Joomla is Version 1.7.3, Virtuemart is 2.0.2.

So while I see what you mean about applying the CSS to the image, then what I have is just a large image falsely scaled down to fit in the template. While yes, that does work visually, wouldn't it present issues with load times? Is there a way for Virtuemart to build a true medium image? Or at least ensure that any image uploaded will have the full version cut down to 900px so I won't have to deal with clients uploading 2500px images?

Thanks much!

atb

Yes, that is why some deprecate the use of scaling via css - it all depends on the circumstances.  I reckon that a 2:1 scaling, when it is useful to have the medium image scaled to 50% whilst clicking to give the full size image (say 800px wide) gives a better view of a product, is a reasonable use of bandwidth.

You did not mention that you are not in control of the image uploads - tricky!  If you have no control over clients that insist on unloading 2500px images then you need to work out some other strategy!!