Author Topic: Problem with product thumbnail generation?  (Read 475 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 185
Problem with product thumbnail generation?
« on: January 21, 2019, 13:00:28 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27345
  • Always on vacation
    • Jenkin Hill Internet
Re: Problem with product thumbnail generation?
« Reply #1 on: January 21, 2019, 15:23:00 pm »
I am currently testing VM3.4.3.10011 and thumbs here are created normally and with the size appended to the filename.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10045 on Joomla 3.9.5 PHP 7.0.33
Testing VM 3.4.5.10045 on Joomla 3.9.5

EvanGR

  • Jr. Member
  • **
  • Posts: 185
Re: Problem with product thumbnail generation?
« Reply #2 on: January 22, 2019, 08:59:51 am »
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

  • Jr. Member
  • **
  • Posts: 185
Re: Problem with product thumbnail generation?
« Reply #3 on: January 22, 2019, 10:13:19 am »
Update:

The following:
Code: [Select]
$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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3430
  • using Matomo instead of Google Analytics
Re: Problem with product thumbnail generation?
« Reply #4 on: January 22, 2019, 11:24:38 am »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10319
  • VirtueMart Version: 3+
Re: Problem with product thumbnail generation?
« Reply #5 on: January 23, 2019, 21:17:01 pm »

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
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

I do NOT do development work for hire.

EvanGR

  • Jr. Member
  • **
  • Posts: 185
Re: Problem with product thumbnail generation?
« Reply #6 on: January 24, 2019, 09:08:13 am »
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.