Hello Magento Lovers,

It's very simple to add Image uploader in admin configuration using system.xml

In System.xml

app/code/Magefever/ImageUpload/etc/adminhtml/system.xml

    <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
	<system>
		<tab id="magentofever" translate="label" sortOrder="10">
			<label>MageFever</label>
		</tab>
		<section id="magefever_main" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
			<class>separator-top</class>
			<label>Add Image Uploader to admin configurtion</label>
			<tab>MagentoFever</tab>
			<resource>Magefever::example_config</resource>
			<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> 
               <label>General Configuration</label>
				<field id="magefever_upload_image" translate="label comment" type="image" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
				    <label>Select Image</label>
				    <backend_model>Magefever\ImageUpload\Model\Config\Backend\Image</backend_model>
				    <base_url type="media" scope_info="1">magefever_directory</base_url>
			   </field>
			</group>
		</section>
	</system>
</config>

	

 

Magefever\ImageUpload\Model\Config\Backend\Image.php

    <?php

namespace Magefever\ImageUpload\Model\Config\Backend;

class Image extends \Magento\Config\Model\Config\Backend\Image
{
    /**
     * The tail part of directory path for uploading
     *
     */
    const UPLOAD_DIR = 'magefever_directory'; // Folder save image

    /**
     * Return path to directory for upload file
     *
     * @return string
     * @throw \Magento\Framework\Exception\LocalizedException
     */
    protected function _getUploadDir()
    {
        return $this->_mediaDirectory->getAbsolutePath($this->_appendScopeInfo(self::UPLOAD_DIR));
    }

    /**
     * Makes a decision about whether to add info about the scope.
     *
     * @return boolean
     */
    protected function _addWhetherScopeInfo()
    {
        return true;
    }

    /**
     * Getter for allowed extensions of uploaded files.
     *
     * @return string[]
     */
    protected function _getAllowedExtensions()
    {
        return ['jpg', 'jpeg', 'gif', 'png', 'svg'];
    }
}