Improved URL generation on get_image method