added the ability to use secure urls for api.base_url
Specific method for building image urls