Hello Magento Friends,

Today’s Magento 2 tutorial will teach you How to Add an Image Upload Field in System Configuration?

Customization is the prime feature of Magento. Users can customize almost anything while working with Magento 2. System configuration provides various options to control the website’s functions. You can add custom options to system configuration as and when required.

Here, we will add an image upload field in the system configuration in Magento 2. Let’s check out the steps.

Steps to Add Image Upload Field in Magento 2 System Configuration:

Step 1: Initially, you need to create a field in the system.xml file, at the path given below.

app/code/Vendor/Extension/etc/adminhtml/system.xml

Use the following code snippet 

Step 2: Next you need to backend the model file Image.php. For that go to the below path

Vendor\Extension\Model\Config\Backend\Image.php

And add the code as follows

Once you perform the above steps successfully, the image upload field is added to Magento 2 system configuration as shown below.

Conclusion:

Hence, you have learned How to Add an Image Upload Field in System Configuration in Magento 2. Same way Add Dynamic System Configuration Field in Magento 2. If you face any hardship, let me know through the comment box. Share the article with your friends and stay in touch with us for more.

Happy Coding!

Click to rate this post!
[Total: 5 Average: 3.8]