Get entry field data via a plugin. ( For specific image assets )
Assuming you already have the entry (see Working with Elements for info about how to do that), you can interact with it exactly the same way you do in your templates - just with PHP syntax instead of Twig.



$asset = $entry-&gt;thumbnail-&gt;first();

if ($asset)
{
    $url = $asset-&gt;getUrl('thumb');
}


Though the transform won’t necessarily be available yet, since getUrl() will not generate transforms that don’t already exist by default. 

That behavior can be customized with the generateTransformsBeforePageLoad config setting though, and lucky for you, you can even override the actual config value from PHP before calling getUrl(), using ConfigService::set():

craft()-&gt;config-&gt;set('generateTransformsBeforePageLoad', true);
$url = $asset-&gt;getUrl('thumb');