Working on Magento 2 custom module implementation and want to add a browse button to upload a file in admin form.

I have gone through the

Magento2 : Admin module Image upload code to display form

but it's not working for me.

Any help is appreciated.


enter image description here

  • pls show code and error. u can get error in var/log/system.log .
    – xanka
    Jan 13, 2016 at 9:38
  • I added the error. please see Jan 13, 2016 at 11:06
  • 1
    i things field image is not true or null. U should check $data before save.
    – xanka
    Jan 14, 2016 at 1:22
  • Please update your question with your code, it's like we have to imagine how is your code which is absolutely different with the code inside the reference link you posted. Jul 10, 2017 at 3:42

1 Answer 1

if ($id) {
After This Add the below code

 if(is_array( $data['image'])){
                $data['image']=implode(" ",$data['image']);


            else {

Do this thing it will solve ur issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.