VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: markholland8 on November 09, 2011, 14:08:30 PM

Title: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: markholland8 on November 09, 2011, 14:08:30 PM
Hi All,

Using VM2 with Joomla 1.7

I have set the category image size and Thumbnail size from 90x90 the 250x250 but it hasn't changed anyone got any ideas why this is or do i need to do something else.

Thanks in Advance Mark
Title: Re: Category and Product Image Thumbnail Resizing
Post by: PRO on November 09, 2011, 15:38:20 PM
EMPTY the resized folder.

make sure dynamic thumbnails are turned on.

THEN, when each page is requested, it automatically recreates them
Title: Re: Category and Product Image Thumbnail Resizing
Post by: markholland8 on November 09, 2011, 16:29:39 PM
That worked many thanks for your quick reply
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: chocolatepudding on December 01, 2011, 16:24:11 PM
Hello,

Tried that but now thumbnails don't show at all.

I'm using Joomla 1.5 and the VM that is not VM 2 LOL!

Thanks.
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: PRO on December 01, 2011, 16:35:42 PM
Quote from: chocolatepudding on December 01, 2011, 16:24:11 PM
Hello,

Tried that but now thumbnails don't show at all.

I'm using Joomla 1.5 and the VM that is not VM 2 LOL!

Thanks.

for 1.1 version
http://forum.virtuemart.net/index.php?topic=63195.msg216496#msg216496
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: jaybird2024 on December 28, 2011, 03:42:04 AM
Hi,
I am using virtuemart 2.
I have emptied the resized folder and have Dynamic thumbnail resizing enabled.
Thumbnail size increased from 90 to 220.

The category product list still has very small images.

When I right click to view the image, I can see that it is resized to the larger size but does not display that way on the site.

It seems that virtuemart is resizing the image but the html is not providing img size properties into the page.
View source-code on browser shows   

<img src="/images/stories/virtuemart/product/resized/product_220x220.jpg" alt="Magnum Beefsteak" class="browseProductImage" border="0" title="Italian Beefsteak"  />

Should look like:
<img src="/images/stories/virtuemart/product/resized/product_220x220.jpg" width="220" height="220" alt="Magnum Beefsteak" class="browseProductImage" border="0" title="Italian Beefsteak"  />


Anyone have an idea how to fix this or why it may be happening?

Thanks
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: PRO on December 28, 2011, 11:26:09 AM
jaybird, the css container is going to resize it if its not as big as the picture.

Change the css, or html container for the image
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: jaybird2024 on December 28, 2011, 19:38:16 PM
BTP, thanks for the quick response.
I am no where near expert in php, etc so please pardon all the questions.

Ok so let me see if I got this right, the VM backend only changes the pic size, to have it reflect that on the page then css and html must be changed.

1 You say change the css or html container, where is that defined, what files? Are you talking about joomla template files or somewhere in the VM files?
2 what does that code look like that I am searching for in those files?
3 Do I have to hand code the exact size in the files or just tell it to autoresize?
4 And what should the fixed code look like when done?

Thanks again, sorry for all the questions.
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: PRO on December 28, 2011, 21:08:11 PM
com_virtuemart/assets/css/vmsite-ltr.css    ( for left to right browsers)


To analyze css
http://forum.virtuemart.net/index.php?topic=73348.0

BUT, i just looked and this will be what you change
com_virtuemart/views/category/tmpl/default.php

<div class="width30 floatleft center">
               <?php /** @todo make image popup */

THE width30    has css applied to it of width:30%

SO, you enlarge it, or just take out width30

ALSO, you should do a layout override, and not modify the original file.
http://forum.virtuemart.net/index.php?topic=90935.0
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: jaybird2024 on December 29, 2011, 07:44:18 AM
BTP, thanks a million, much appreciated.
I will review the links you posted for me and examine the files as you stated.

Thanks again
J
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: mensah on January 07, 2012, 07:19:59 AM
TO:BanquetTables.pro

Thanks for you post, but I didn't find the :div class="width30 floatleft center">
               <?php /** @todo make image popup */
in the folder:com_virtuemart/views/category/tmpl/default.php

so what to do to resize my thumbnails, pls be noted i am using VM2.0.


tKS!
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: PRO on January 07, 2012, 13:30:05 PM
the newest version has this
<div class="additional-images">

so look in the css
http://forum.virtuemart.net/index.php?topic=73348.0

and change the width (if it has one)

if not, to resize the images, you neeed to change the default image size in the vmart cnfiguration.

THEN, make sure dynamic thumbnails are turned on.
DELETE the images that are in the /resized/ folder, and the new size will automatically be created

Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: cvoogt on March 23, 2012, 00:53:05 AM
I found myself having to use CSS for this as well, but this is not a great solution, especially with large images. It adds a lot of unnecessary load time.
I find myself wishing for GD Image or ImageMagick to be integrated (again) with VirtueMart. That appears to have disappeared. It's understandable since the new VM is a total rewrite.
CSS will have to do for now, I guess, or otherwise manually uploading thumbnails that have been created on my PC. But I can't expect my customers to do that ... they should be able to simply upload a product image and forget about it.
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: ksoender on March 23, 2012, 12:05:14 PM
I have virtuemart 2 and Joomla 1.7 as well.

It seems that My system has screewed up a bit as well. My pictures are resized as thumbnails. but not as product images in the product category. e.g. I have a large picture, say 640X480. My configuration is set to 150X150, but the product page now shows the full picture at 640X480 in the product details page.

Is this an error in my CSS in the template?

Ksoender
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: jakobe on March 31, 2012, 00:54:51 AM
I am running into this issue as well, I have to do 20 different things for each page, category, product and image.
just ot "see" what it looks like....just ot test out a lyout I have to modify the entire sites css.....


its a joke...

I have never decided to abandon virtuemart before, but this is unacceptable to have to make all of the changes to the css just to get one category and set of products in place.

my customers will explode when they find out they have to learn how to resize and calculate this on their own,

I am looking into other cart options for Joomla now, I am disappointed in the developers and moderators of Virtuemart, very disappointed. It seems you are actively working against making this easier and smoother to use,

you would rather pack in a ton of features and expect everyone to edit code. You guys may know how to build shopping software, but you dont know anything about what a consumer wants or what a shop manager wants.
This platform lacks the most basic ease of use functions.

I have used VM for many years and saw the community growing, now I see frustration and aggravations and a system that has become so complex that nobody can easily manage it without consulting the forum.

My customer has requested this install because of VM affiliates and he loves the affiliate program, sadly I dont think its in his best interest to pursue this project on VM anymore.

Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: rupesh on May 03, 2012, 12:01:24 PM
Quote from: BanquetTables.pro on January 07, 2012, 13:30:05 PM
the newest version has this
<div class="additional-images">
if not, to resize the images, you neeed to change the default image size in the vmart cnfiguration.
THEN, make sure dynamic thumbnails are turned on.
DELETE the images that are in the /resized/ folder, and the new size will automatically be created

hoe to change default image size in the vmart cnfiguration?
Title: Re: Category and Product Image Thumbnail Resizing
Post by: rupesh on May 03, 2012, 12:26:10 PM
Quote from: BanquetTables.pro on November 09, 2011, 15:38:20 PM
EMPTY the resized folder.

make sure dynamic thumbnails are turned on.

THEN, when each page is requested, it automatically recreates them
i have set 85 *145 and empty resized folder but now its looking very odd
see
http://www.elifeshopping.com/index.php?option=com_virtuemart&view=category&virtuemart_category_id=50
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: man-cave-signs on September 05, 2012, 00:42:23 AM
Worked for me! SORT OF  8)
Deleted thumbnails, but then sure enough the default VM Template still generated 90 x 90 thumbs, so??

The Default Virtuemart Template layout for displaying products and categories sets their container style to a width of 30%. I just simply changed this in the CSS File located in /joomlaroot/components/com_virtuemart/assets/css/vmsite-ltr.css    <---- This is CSS for VM Template, not the same as your site template ya digg?       download the file via ftp    ,   open with wordpad and do a quick search for .width30 and delete everything inside the {  } brackets  that follow it-- -- ---   boom, now the VM template isn't resizing my thumbnails to 30% and they are showing properly with 2 products per row and 250 px X 250 px, EASY DAY!!!       If you need an EASY WAY TO CHECK and MODIFY CSS on live sites try firebug , its an addon to firefox and lets you make live changes to CSS files without actually changing them so you can preview the changes, and see what css is affecting what parts of the site, GOOD LUCK ERY ONE!
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: chiappa on September 24, 2012, 16:45:35 PM
watch out for overrides

div.category-view div.floatleft { border: 2px solid #f6f6f6; border-radius: 0px 0px 10px 10px; -moz-border-radius: 0px 0px 10px 10px; -webkit-border-radius: 0px 0px 10px 10px; margin-top: 15px !important; margin-right: 7px !important; width: 170px !important; height: 170px !important; padding: 5px 0 !important; text-align: center; }

div.category-view div.floatleft img { max-height: 110px !important; min-height: 110px !important; padding: 5px; }

If you have a linux box.. for example you can try grep -r -H "div.category-view" . in Joomla root to see if you have overrides in your template folder as was my case.. First bunch of CSS sets the category box size, second the image size within.
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: anisimow on February 17, 2013, 21:46:38 PM
css isn't a good idea to solve this problem.  Your browser must load huge images and if there is a lot of images and slow internet.  You mast generate thumb with VM tools
instend
$image = $product->images[0]->displayMediaThumb ('class="featuredProductImage" border="0"', FALSE);
insert
if (!empty($product->images[0]) && is_a($product->images[0],'VmImage')) {
//$image = $product->images[0]->displayMediaThumb ('class="featuredProductImage" border="0"', FALSE);
$width=141;//your width
$height=195;//your height
$prod_img = &$product->images[0];
$file_name_thumb = $prod_img->createThumbName($width,$height);
$resizedImage_url = $prod_img->file_url_folder_thumb.$file_name_thumb.'.'.$prod_img->file_extension;
if (!file_exists($resizedImage_url)) {
$resizedImage_url = $prod_img->createThumb($width,$height);
}
$image = JHTML::image(JURI::root().$resizedImage_url, '', '');
} else {
$image = '';
}

good luck
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: lostmail on June 01, 2013, 21:52:21 PM
hm - emptied all images in folder resized => cleared cache in Joomla => go to Frontpage => call some pages => no images are resized.....

What can that be that the resize function is not working anymore ?

Dynamic image modification is enabled in VM

Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: ironlion37 on June 03, 2013, 21:04:09 PM
I've found a potential solution for this. I use this plugin on my site:

http://www.magictoolbox.com/magiczoom/

It works well and is capable of generating and displaying thumbs on the flypage (does anyone know why it's called that?) as well as on category browse pages. It then loads the fulls size image for zoom after page load. Actually that's an assumption - I have an email into the developer to confirm...

You can see in action here: www.thecrystalcache.com
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: rayge on June 04, 2013, 09:41:01 AM
I am having the same issue.. 
Dynamic Thumbnail Resizing is on but no Product thumbnails are being rebuilt.
Category thumbnails are working though

**UPDATE**
OK for others with this issue use the following query:

UPDATE `PREFIX_virtuemart_medias`SET file_url_thumb = '' WHERE `file_type` = 'product';
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: guybr on August 21, 2014, 07:33:55 AM
I'm assuming the solution to this problem still involves deleting the images in the "resize" folder - but a search in the forum doesn't yield its address for VM 2.

Where do I find that directory? Do I delete the directory itself or just the images it contains?
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: jenkinhill on August 21, 2014, 10:54:02 AM
The resized directories are located where yiou should expect to find them, eg for products - images/stories/virtuemart/product/resized/

Delete the files, not the directory.
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: d0ublezer0 on February 11, 2016, 14:26:24 PM
Hi!
how to force vm to rebuild all the images at once?
Dynamic mode slows down first page load
more than 3000 goods -
will be cool, if all images recreated at once
Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: tehribo on April 25, 2016, 19:56:13 PM
All images in /resized/ folder - Deleted
Dynamic Thumbnail Resizing - Enabled
UPDATE  `klhd8_virtuemart_medias` SET file_url_thumb =  '' WHERE  `file_type` =  'product'   -SQL Query done

In a category view the thumbnail size is small and ugly again :(

Title: Re: [SOLVED] Category and Product Image Thumbnail Resizing
Post by: PRO on April 26, 2016, 16:51:57 PM
Quote from: tehribo on April 25, 2016, 19:56:13 PM
All images in /resized/ folder - Deleted
Dynamic Thumbnail Resizing - Enabled
UPDATE  `klhd8_virtuemart_medias` SET file_url_thumb =  '' WHERE  `file_type` =  'product'   -SQL Query done

In a category view the thumbnail size is small and ugly again :(



is the css restraining the size?