Product Thumbnails are breaking in my Shopify App
Hey everyone, I’m building a Shopify app and running into an issue with product images. On a page where users assign tags to products in the app, the product thumbnails aren’t populating. I’m just seeing a broken JPEG icon instead.
Has anyone run into this before? Every time I tell the agent to fix it, it doesn't fix and just eats my credits...I am not a coder btw 🙂
Any guidance or examples would be super helpful.
1 Reply
Hello,
I know exactly whats happening and can help you fix it but it won't be easy to make the assistant not break your images again.
The shopifyProduct/shopifyProductVariant models are linked to the shopifyFile model via a hasManyThrough relationship (shopify<Product/ProductVariant>Media). On the shopifyFile model there's a field called
image
. You need to use that field and use its originalSrc
value.
Right now, the assistant is probably using src or something else incorrect.
Let me talk to the team and see if we can write some prompts to force the assistant to get this right
Were you able to figure this out?