Images url improvements

Hi!
I had to add the possibility to use the API's **secure_base_url** in order to get  the  *HTTPS* url.
Also I've created a method just for building the image url and also refactored the code in order to use this method.

Hope it is something useful and worthwhile to include in the main branch.

With best regards,
Alex