How to get thumbnail url

Permalink
Before this I was able to get image URL for background-image in page list using

$img->getTag()->src; //this gives me the thumbnail url

However, now I want to use the responsive feature for thumbnail, so I did this in page_theme.php

public function getThemeResponsiveImageMap()
{
return array(
'small' => '0'
);
}

$img->getTag()->src; //this doesn't work anymore even if i did, i won't get the 'small' version of the thumbnail.

For those who know, please tell me how to get the src for thumbnail if responsive feature is enabled.

<?php
$img = Core::make('html/image', array($thumbnail));
$tag = $img->getTag();
$tag->addClass('img-responsive');
print $tag;
?> //this works but I just need the URL instead of the whole <img></img>

 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.