public function create($productId, ProductImage &$productImage)
    {
        $data = $productImage->exportData();
        $endpoint = '/admin/products/'.$productId.'/images.json';
        $response = $this->request(
            $endpoint, 'POST', array(
            'image' => $data
            )
        );
        $productImage->setData($response['image']);
    }
public function create($productId, ProductImage &$productImage)
    {
        $data = $productImage->exportData();
        $endpoint = '/admin/products/'.$productId.'/images.json';
        $response = $this->request(
            $endpoint, 'POST', array(
            'image' => $data
            )
        );
        $productImage->setData($response['image']);
    }
public function create ( $ productId , ProductImage & $ productImage ) { $ data = $ productImage -> exportData ( ) ; $ endpoint = '/admin/products/' . $ productId . '/images.json' ; $ response = $ this -> request ( $ endpoint , 'POST' , array ( 'image' => $ data ) ) ; $ productImage -> setData ( $ response [ 'image' ] ) ; }
Create a new product Image

@link   https://help.shopify.com/api/reference/product_image#create
@param  integer      $productId
@param  ProductImage $productImage
@return void
Create a new product Image