Gallery transfer between server

Hi community,
recently, I decided to shift from KF server to Humanitarian server. I am able to export data from KF server and import it to humanitarian server. But the issue I am facing is that the data only includes Text data and not the images. It has the image names like ‘110401976.jpeg’ but I am unable to view these images as these images does not exist in the ‘Gallery’ tab of the form in the left. I want to export the images as well. I have nearly 400 forms, and every form has a minimum of 4 images, doing it manually would take a lot if time. I am familiar with the API of both the servers, so if it could possibly done by API, I am ready to do the task, it’s just that I am unable to figure out how to do it, and I am not sure whether it is even possible or not.

Thank you in advance