Search code examples
prestashopsmarty

Prestashop Find path to product orginal image in .tpl


In Prestashop 1.7 product .tpl file there is f.e.

{$product.default_image.bySize.large_default.url} 

variable which resolving one of auto-generated thumbnail of name '{id}-large_default.jpg'. Is there a variable which contains orginal uploaded picture of name '{id}.jpg' in the same folder? If it's not is there a way to get path to that image in .tpl file?


Solution

  • You can do:

    {$product.default_image.bySize.large_default.url|replace:'-large_default':''}

    not an ideal way, but it works :)