{basePath} creates a folder named {basePath} issue just built a blog with craft, and I got some issues with assets pathing.
In the general.php I put

return array(
    'environmentVariables' =&gt; array(
            'basePath' =&gt; '/images',
            'baseUrl'  =&gt; 'https://site.com',
        )
);


But when I put {basePath} to assets path, the system creates a {basePath} named folder in root and looks for the image folder there. Also the {baseUrl} is looking like this in the code:

https://site.com/{baseUrl}/images/image.jpg

Am I doing something wrong?
Assuming this is using Craft 3, you should use aliases.

In your config/general.php add:

'aliases' =&gt; [
    'web' =&gt; 'https://site.com',
    'webroot' =&gt; dirname(__DIR__) . '/web'
],


Then in your Control Panel, under Settings → Assets → Images, set your Base URL to @web/images and File System Path to @webroot/images.