I created a script to add a new product through the API.
Everything is working. But there is a problem with the images.
All my images have a port number of ":8081" in the link.
These images are not loaded via the API.
Images not having ":8081" - work.
Shopify probably blocks such links.
Is there any way to allow stores to work with such links?
Can you make your question clearer? What do you mean "Is there anyway to allow stores to work with such links?"
You want Shopify to serve up your images. So upload them to the products in question. You have many choices that way. When you say images not having a port desigation work, what does that mean? Work how?
Thanks for the answer.
I'm sorry that the explanation is not detailed enough.
I need to create a product and upload images using the API. My script is working correctly.
If the link to the image looks like "SITE.com/image_1.jpg" - everything works - the product is created and has an image.
It works as it should.
But, if the link to the image looks like "SITE.com:8081/image_1.jpg" - the product is created, but there is no image.
If I try to add images through the admin panel, I get an error:
I think the problem is in the link - ":8081"
I cannot change the link because all the images are stored on the client server.
Does Shopify have any restrictions on working with image links? Is there any way to change this?
Or maybe there is another reason for the error?
Shopify has an upload media option that may work for you. The script I would write would do the following.
With that, you can have all the images, and not worry about the ones with the port declaration being missed.