Uploading Images to embed on articles body

Uploading Images to embed on articles body

eloyesp
Shopify Partner
5 0 2

When uploading articles using the REST API, there is a field for the featured image that works fine, but there is no way to add images on the article body.

Adding links to existing CDNs does not make much sense when migrating, as those CDNs will eventually be dropped, and the articles will stop working. Another option is to embed the images a base64, but that makes the body to large.

Is there anyway to upload the image to shopify and then link the image properly on the shopify CDN?

Regards

The only workaround that comes to my mind is POSTing the article with the first image as the featured image, greping the CDN link from the response and replacing it on the body, PUTing the article again with the second image and repeating... That seems like sub-optimal, but should work...

Replies 2 (2)

Luke_K
Shopify Staff
402 66 101

Hey @eloyesp 

Thanks for raising this! It would appear that this is a limitation with our API.

I have passed this feedback on to the team responsible for this and we are looking into things presently. We'll be sure to communicate any updates as they arise.

 

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
eloyesp
Shopify Partner
5 0 2

Ok, will test it once it is ready.

Thanks.