I like base_url() so much that I want to create another global function base_img_url() where I can define the url in the config.php file just like base_url(). How do I do this and where should the function be? Is this a common practice?
Right now I’m just defining a constant in constants.php.
Your are going right.
I am also doing the same, defining in constants.php file.
I do not think any other way, as you are expecting is possible.
Defining in constants file, is the best and easiest plus non-problematic way.
What can be wrong doing like this ?