Author Topic: How to get product image or thumb URL? [Solved]  (Read 15094 times)

legal

  • Beginner
  • *
  • Posts: 7
    • Parfumi
How to get product image or thumb URL? [Solved]
« on: October 11, 2011, 18:45:21 pm »
What I want is to get URL of product image or product thumb so I can put this URL in this code:

<meta property="og:image" content="I want to put URL of product image here" />

Why I want to do this?

Because I want Facebook to display image of product when someone like some product in my shop.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10352
  • VirtueMart Version: 3+
Re: How to get product image or thumb URL?
« Reply #1 on: October 11, 2011, 19:43:16 pm »
MAYBE, this

$product->images->file_url_thumb   

or for large
file_url
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

legal

  • Beginner
  • *
  • Posts: 7
    • Parfumi
Re: How to get product image or thumb URL?
« Reply #2 on: October 11, 2011, 21:17:35 pm »
Thanks for help.

This is the code which give you URL of product thumb:
<?php echo $this->product->images[0]->file_url_thumb; ?>

ncde

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: How to get product image or thumb URL? [Solved]
« Reply #3 on: November 12, 2015, 09:23:08 am »
Since VM 3.0.12 I think only "$this->product->images[0]->getFileUrlThumb()" does work.