Assuming you have a field with the image reference, the code should look something like this:
var imgageLink = Util.ReplaceCptInternals(asset["image_field"], addDomain: true, protocolType: ProtocolType.Https);
You shouldn't need to do this in the output handlers (output.aspx) as the DXM publishing engine will take care of this itself. However, if you need this link in some other context, typically a Search G2 handler, then you will need to call this method.
But I am looking something which provide the asset path (image path should access for the public) .
we are creating the JSON for mobile application where they can access the content and assets, but we are facing the deficuties to get the full url which is accessed publicaly. I implemented with whatever you suggested but that is giving me .asp file. hope you understand my concen.