Cart ImageInput.url improvements #406
Replies: 4 comments 9 replies
-
Certainly, we also urgently need to use external image resources, a requirement shared by a majority of our clients. This is due to the extensive range of design and customized products, numbering in the tens of millions. The final preview image is crucial during the checkout process. In the past, this was permitted without any issues. However, the alternative now requires the cumbersome process of attempting to upload image resources via the Admin GraphQL File API before adding them to the cart when a customer makes a purchase. This results in a slow shopping process and a less-than-optimal user experience. Moreover, during peak traffic, this method is prone to failures due to imposed limits. We earnestly request the provision of support for external image resources. Thank you. |
Beta Was this translation helpful? Give feedback.
-
We get this request from our customers almost daily. So far we haven't seen any update from Shopify 😞 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
To make matters even worse, shopify's function is not even accepting their own version of new assets urls, which is blocking from using assets that are hosted on shopify itself! |
Beta Was this translation helpful? Give feedback.
-
The ImageInput.url field used to allow external non Shopify hosted URL, but now it's returning the following error:
The new validation is most likely because the Checkout auto adds the CDN size filters like _128x128
Only allowing Shopify hosted URLs prevents all use cases when a preview image should be generated on the fly.
For example; a Customer can design a t-shirt, when the shirt is added to the cart, a preview with the shirt design is generated and should be shown on the checkout line item image.
One solution would be to use the GraphQL Files API through an app hosted server, but this process is very slow, and it will make a mess in the Files section.
Improvements
Cart API uploaded file support
Theme code can upload a file using the Cart Ajax API
The resulted file link has the following format:
Setting this link on the ImageInput.url field works. (As it passes the newly added CDN checks), but then the Checkout adds the CDN image filters which are not supported on this path and a 404 is returned.
External hosted image support
Allowing external images would allow for much more flexibility for app devs.
The Checkout UI code should then check if the image is external, and avoid auto adding the CDN image filters.
Beta Was this translation helpful? Give feedback.
All reactions