We are trying to upgrade our PHP code that interfaces with Shopify from PHP version 7.3.11 to PHP version 8.2.8. We have tested a number of interfaces to Shopify’s APIs via the new PHP version including fulfilling orders, creating products, updating products, and adding inventory. However, when we try to add images via the /products/shopifyid/images.json API the images do not load. The code works perfectly in 7.3.11 but not in 8.2.8. We are posting to the API. Adding inventory using the posting code and it works. Adding the images is the only thing we found that doesn’t.
Here is PHP code and function we use to upload images. It is failing with PHP version 8.2.8