Leveraging Core Functionality in Icon Upload Plugin [closed]

Firstly you can upload the image using wp_media_handle as it returns attachment id.

Then try to add your desired metafields by passing the same id in each of them.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)