How to add default values for system configuration in magento 2.
I need to create and assign default values for system configuration(system.xml) for my custom module.
I have already created system configuations for my custom module.
In ui-form I have a field(flieuploader) namely small image which contains **backend system configuration which I have shown in below image**.
For below system configuartion
I have reffered to set system configuation like below using \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray.php and \Magento\Config\view\adminhtml\templates\page\system\config\form\field\array.phtml
Now,It works good and the configuation is also saved in DB. But I need **to create default values for my system configuration in config.xml. Please provide me a solution.
In core_config table My system config value is stored in below format for small image
{"_1517563385604_604":{"width":"480","height":"300","imagesize":"25900"}}
For imagefile type
jpg,jpeg,png,gif
How Do I give this value in config.xml which is in default configuration
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>
<section id="aaa" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
<label>XXXXX</label>
<tab>x_y_tab</tab>
<resource>X_Y::config</resource>
<group id="groupslide" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>YYYYY</label>
<field id="small_image" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Small Image</label>
<frontend_model>X\Y\Block\Adminhtml\System\Config</frontend_model>
<backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
</field>
<field id="image_file_types" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Image File Types</label>
<comment>Multiple values are seperated with comma</comment>
</field>
</group>
</section>
</system>
</config>