I have found the solution for this.
Settings -> Miscellaneous
Do both of the following:
Store uploads in this folder -> absolute path to folder you want to use
Example: /home/user/public_html/images
Full URL path to files -> actual URL of folder you want to use
Example: https://www.example.com/images
Note: As shown in the examples above, do not use a trailing slash.
How to find your absolute path:
Using a text editor (such as Notepad), copy and paste the following code, and save it as path.php
<?php
$p = getcwd();
echo $p;
?>
Upload path.php to the folder you want to use, then open it in a web browser (example: https://www.example.com/images/path.php). It will display your absolute path.