I'm trying to build an XD plugin and wanted to retrieve images from a remote server. Would this be possible? If so, what APIs can I use?
Absolutely! The Adobe XD plugin environment provides standards-compliant implementations of XMLHttpRequest
, WebSocket
and fetch
APIs. See the Network I/O documentation for more information regarding what is and isn't supported.
For an example of how to use XHR
in your plugin, see the How to make network requests tutorial.
For your particular use case, you should check out the Adobe Stock Photo Search example in the Samples repository.
Depending on what you need to do to the image, you may also need to use some of the Storage APIs.