secure_asset

The secure_asset function generates a URL for an asset using HTTPS:
<?php $url = secure_asset('img/photo.jpg');