Upload images from one server to an other in wordpress

You’ve got a path problem. When the plugin executes, any reference to a file is relative to the plugin folder.

Use developer tools (like Firebug) to see the actual request for the jpg file. You’ll see that it is trying to find the jpg file in the plugin folder. Adjust the path to the files.

Take a look at the get_template_directory_uri() function to help you get the proper path for your images. See https://developer.wordpress.org/reference/functions/get_template_directory_uri/ .