News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Problem with product thumbnail generation?

Started by EvanGR, January 21, 2019, 13:00:28 PM

Previous topic - Next topic

EvanGR

Hello,

Did any of the recent VM versions suffer from thumbnail generation issues?

Our production site is currently on VM 3.2.15. Product thumbnails are the same size as the original image! (yes, they are located in the /resized/ folder). The thumbnail filenames do not contain the size (.e.g. _280x280.jpg) in the filename. Something seems to be broken with VM.

The older products and thumbnails, generated by VM 2.x, are fine.

The new products, that we put after the VM 3.2.15 upgrade (from VM 2.x) are not.

In a test site, we updated to VM 3.4.2. Same problem with previous products. No problem when adding new products.

The option "Enable Dynamic Thumbnail Resizing" is activated everywhere.


Thanks

jenkinhill

I am currently testing VM3.4.3.10011 and thumbs here are created normally and with the size appended to the filename.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

EvanGR

Thanks. It also seems to work fine on VM 3.4.2 (on our test site), when adding new products.

The products that were created on VM 3.2.14 (production site), use thumbnails with the same size as the original image! (i.e. the /resized/ images are NOT resized at all)

It's probably a bug with VM 3.2.14. Need confirmation.

We then need a way to regenerate the thumbnails for those products, and produce properly resized thumbnails.
What is the recommended way to do that?

a) Use the displayMediaThumb function in my template, to enforce (and test) thumbnail creation at specific sizes
b) Use the 'Reset Thumbs' function in VM. Though I do not trust this option... I ended up with missing images for me, when I tried it once, in the past.

Thanks


EvanGR

Update:

The following:
$thumbFile = $product->images[$i]->displayMediaThumb("",true,"rel='vm-additional-images'", true, true, false, 40, 40);

does NOT create a new thumbnail image with a size of 40x40 (or approximate) in the 'resized' folder.

Can you spot a problem?

The above function runs in a loop, where $i counts each of the available product images.

Any help appreciated, thanks.

VM 3.4.2.

jjk

#4
Quote from: EvanGR on January 21, 2019, 13:00:28 PM
The older products and thumbnails, generated by VM 2.x, are fine.

Sounds to me like an image path (location) issue. Some time ago (I don't remember in which version) the 'stories' folder was eliminated from the image path.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

PRO

Quote from: EvanGR on January 22, 2019, 08:59:51 AM

We then need a way to regenerate the thumbnails for those products, and produce properly resized thumbnails.
What is the recommended way to do that?

empty the thumbnail folder.

Then they are created the first time a page loads with that specific thumbnail size set.

"Dynamic Thumbs" turned on

EvanGR

Thanks for the replies. After much research, I came to the conclusion that VM 3.2.15 (our production site) is to blame.

The thumbnails it creates, are not resized, they are the same size as the original image. It's a bug of some sort.

I have to 'Reset Thumbs' every time I create a new product, for the thumbnails to generate properly.

It seems to work fine on a test site with a newer VM version (VM 3.4.2 or similar)

Thanks for your time and patience.