CDN hosted images not being used

Hi,

I’m using Sanity.io and their CDN for the images on the site. I’m adding the item through the Snipcart.api.cart.items.add() api method as the image property. It’s a fully-qualified url, like:

https://cdn.sanity.io/images/<account>/production/image-1000x1400.jpg?rect=0,140,1000,1241&w=290&h=360&auto=format

However, I cannot see those images being shown in the order confirmation emails (sent to the client) nor anywhere in the Dashboard (not sure about this last bit being supported even).

It appears that a relative URL is expected, or perhaps I should add cdn.sanity.io to the configured domains in the Dashboard?

Using images with an absolute URL is the way to go if you want them to display on invoices. Relative URLs wouldn’t work.

However, you must enable this in the Orders & Invoices section of the dashboard:

By checking this option, images will be displayed on the invoice. Images aren’t displayed in the dashboard at the moment though, so this is normal that you don’t see them there.

Thanks, I somehow missed that option! It works now! Although I wish I could hide my UUID product id which messes up the email table layout … I guess I will have to go in and change the template for that?

Exactly, this is something you should change in the template directly.