Hi Guys, Just wondering whether I'm doing something wrong or you just can't use size function for images inside of my global functions.php. I have an about page and on this page am going to render directors of the company. So I have made a function so as not to keep rewriting the same code of course. If I use:
$alex = $users->get("name=alex");
$image = $alex->images->first;
echo "<img src=\"{$image->size(369, 369)->url}\" />";
from within the about template there is no problem at all. Now if I do the equivalent from within the functions file I get: Error: Call to a member function size() on a non-object (line 249 of /Path/To/My/Website/site/templates/includes/functions.php)
Any thoughts please?
Thanks
Alex