shopify/products/objects/image.py
def attach(self, f):
        """
        Attach an image file instead of using a url.
        :param f: Path to image file.
        :return:
        """
        with open(f, 'rb') as f:
            encoded = base64.b64encode(f.read())
        self._dict['attachment'] = encoded
        self.image_location = f

        Attach an image file instead of using a url.
        :param f: Path to image file.
        :return:
        
Attach an image file instead of using a url.
Attach an image file instead of using a url .
def attach(self, f):
        with open(f, 'rb') as f:
            encoded = base64.b64encode(f.read())
        self._dict['attachment'] = encoded
        self.image_location = f
def attach ( self , f ) : with open ( f , 'rb' ) as f : encoded = base64 . b64encode ( f . read ( ) ) self . _dict [ 'attachment' ] = encoded self . image_location = f
Attach an image file instead of using a url.
Attach an image file instead of using a url .
"""
        Attach an image file instead of using a url.
        :param f: Path to image file.
        :return:
        """
None
self
f
Path to image file.
Path to image file .