Changing an image in each product page

One more variant how you can do this:

  1. Export your product CSV file.
  2. Open it and replace the old URLs with the new ones.
  3. Save and Import them back to the store.
Shopify subject matter expert | Founder at GenovaWebArt | Full-services shopify agency | info@genovawebart.com
0 Likes
Shopify Partner
125 0 13

You could update your theme settings in the site code to add a blank for product image url. And then reference that as a variable in the code. Then you could change the url via the customization page.

im away from my computer now, but if this would be suitable I can help with more detailed instructions

0 Likes
Shopify Partner
2569 40 599

I agree with Ryan, the best (and most Shopify way) would be to modify the theme settings_schema.json (looks like your theme is not Sectioned?) to include an option to select an image and then use it in your liquid code.

NB! Creating a backup copy of the theme via Actions => Duplicate is a must before fiddling with schema!

Open your settings_schema.json Config, find:

    "name": "Product page",
    "settings": [

 and put something like this right below:

      {
        "type":		"image_picker",
        "id":		"product_extra_image",
        "label":	"My extra image for product page"
      },

then you can use it in your liquid like this:

{% if settings.product_extra_image %}
  {% settings.product_extra_image | img_url: "1024x" | img_tag: "this will be an Alt tag"  %}
{% endif %}

You will be able to select an image in theme Customizer under Theme Settings => Product Page.

If you want to upload your image to the Files section of your shop, you'd need to delete the existing image with the same name first, otherwise system will add an unique suffix to the file name.

If you'd be storing the file in theme Assets, then the system will ask if you want to overwrite the existing file with the same name.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
0 Likes