How can I use the admin API to upload local images to products

We have a requirement to use local images on the product. Due to the high demand, we would like to upload product images using the rest amdin API, but I don’t know how to generate “attachment” data.

Hey @luoooofei

Attachment is a Base64 version of the image. https://base64.guru/converter/encode/image