diff --git a/shopify/resources/image.py b/shopify/resources/image.py
index c5f9fd2..a0e82ef 100644
--- a/shopify/resources/image.py
+++ b/shopify/resources/image.py
@@ -8,6 +8,14 @@ import re
 class Image(ShopifyResource):
     _prefix_source = "/admin/products/$product_id/"
 
+    @classmethod
+    def _prefix(cls, options={}):
+        product_id = options.get("product_id")
+        if product_id:
+            return "/admin/products/%s" % (product_id)
+        else:
+            return "/admin"
+
     def __getattr__(self, name):
         if name in ["pico", "icon", "thumb", "small", "compact", "medium", "large", "grande", "original"]:
             return re.sub(r"/(.*)\.(\w{2,4})", r"/\1_%s.\2" % (name), self.src)
@@ -24,3 +32,8 @@ class Image(ShopifyResource):
             return []
         query_params = { 'metafield[owner_id]': self.id, 'metafield[owner_resource]': 'product_image' }
         return Metafield.find(from_ = '/admin/metafields.json?%s' % urllib.parse.urlencode(query_params))
+
+    def save(self):
+        if 'product_id' not in self._prefix_options:
+            self._prefix_options['product_id'] = self.product_id
+        return super(ShopifyResource, self).save()

Support for independently creating/modifying product images.
Please correct me if I'm wrong, but at the moment the only way to create/update product images through the Python API is directly through a POST/PUT call to the product endpoint.

As per the [Shopify API documentation on product images](http://docs.shopify.com/api/product_image), we should be able to make POST and PUT calls directly to `/admin/products/#{id}/images.json` and `PUT /admin/products/#{id}/images/#{id}.json`. However, this doesn't seem to work currently with the API as the prefix for the `Image` class isn't properly being built. Thus, something like this...

```python
image = shopify.Image()
image.src = "http://example.com/example.png"
image.product_id = 123456789
image.save()
```

... tries to POST to `/admin/products//images.json` which returns a 406.

Looking at the source, I think a fix would be to implement the `prefix()` class method, similar to what's been done with the `Variant` class. Just wanted to run this by folks who might be more familiar with this to see if that might be a valid solution.
diff --git a/test/image_test.py b/test/image_test.py
index 935f53b..1234898 100644
--- a/test/image_test.py
+++ b/test/image_test.py
@@ -13,6 +13,17 @@ class ImageTest(TestCase):
         self.assertEqual('http://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1389388540', image.src)
         self.assertEqual(850703190, image.id)
 
+    def test_create_image_then_add_parent_id(self):
+        self.fake("products/632910392/images", method='POST', body=self.load_fixture('image'), headers={'Content-type': 'application/json'})
+        image = shopify.Image()
+        image.position = 1
+        image.product_id = 632910392
+        image.attachment = "R0lGODlhbgCMAPf/APbr48VySrxTO7IgKt2qmKQdJeK8lsFjROG5p/nz7Zg3MNmnd7Q1MLNVS9GId71hSJMZIuzTu4UtKbeEeakhKMl8U8WYjfr18YQaIbAf=="
+        image.save()
+
+        self.assertEqual('http://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1389388540', image.src)
+        self.assertEqual(850703190, image.id)
+
     def test_get_images(self):
         self.fake("products/632910392/images", method='GET', body=self.load_fixture('images'))
         image = shopify.Image.find(product_id=632910392)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.8.0
exceptiongroup==1.2.2
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
pyactiveresource==2.2.2
pytest==8.3.5
pytest-cov==6.0.0
PyYAML==6.0.2
-e git+https://github.com/Shopify/shopify_python_api.git@657517e9b83e0e99404d994047b3bfea3b73d310#egg=ShopifyAPI
six==1.17.0
tomli==2.2.1

name: shopify_python_api
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pyactiveresource==2.2.2
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pyyaml==6.0.2
      - six==1.17.0
      - tomli==2.2.1
prefix: /opt/conda/envs/shopify_python_api

test/image_test.py::ImageTest::test_create_image_then_add_parent_id
test/image_test.py::ImageTest::test_create_image test/image_test.py::ImageTest::test_get_image test/image_test.py::ImageTest::test_get_images test/image_test.py::ImageTest::test_get_metafields_for_image
shopify/resources/image.py
shopify/resources/image.py