Magento 2 Admin custom form image upload.

Step 1: Add Below code in n _prepareForm() function inside app/code/Vendor/Module/Block/Adminhtml/Module/Edit/Tab/Main.php Step 2: Now in execute() method of your save controller file. use below code to save and upload image. app/code/Vendor/Module/Controller/Adminhtml/Index/Save.php use Magento\Framework\App\Filesystem\DirectoryList;

Design a site like this with WordPress.com
Get started