function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dipudipu 

What is the equivalent of {!$Resource.TestImage} in apex code?

I want to get the  image URL in a VF page from the controller class. The image is in the StaticResource.

What is the equivalent of {!$Resource.TestImage} in the apex class? 

Best Answer chosen by Admin (Salesforce Developers) 
dipudipu

Got it. It is just thisURL  '/resource/TestImage'