Image from Metafield is not displayed in Mail

puppyspike
Shopify Partner
3 0 0

I sell Customized products where I create the images and want to show them to the customer.

For this I have already added an object as metafield of the order (file as list) and selected only images.

In the email template for customer notification, I have also already added the following liquid:

{{ metafields.custom.customize | metafield_tag }}

However, with only the GID is displayed and not the image itself or at least the image URL to use.

Even without the metafield_tag this doesn't change and always outputs only GID. Is it possible to read this at all? Have also tried other variations with "img_url: 'small'" but there it outputs the URL of "image not found".

Output is e.g. gid://shopify/MediaImage/35918980088117

Otherwise, is there any other way to display the URL or image in the email? Or possibly, when storing the images as a list, that this is automatically stored as JSON in another metafield and I could read that from it? Although a bit too much data back and forth stored but would be fine for me. Would not like to use an app or copy and paste the URL each time.

 

This is what the template says:

Bildschirmfoto 2023-09-19 um 10.34.51.png

 

This is what is output as mail:

Bildschirmfoto 2023-09-19 um 10.35.17.png

Replies 3 (3)

Guleria
Shopify Partner
3084 604 861

I think it should be 
{{ metafields.custom.customize | img_tag }}

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
puppyspike
Shopify Partner
3 0 0

Unfortunately, that didn't help either.
I added a metafield with only one image.

Source code from the email with two images as a list:
<img src="https://cdn.shopify.com/shopifycloud/shopify/assets/no-image-100-c91dd4bdb56513f2cbf4fc15436ca35e9d4..." alt=""/>

Source code from the e_mail with one image:
<img src="gid://shopify/MediaImage/34822884491573" alt=""/>

what me here however additionally wonders. that not even that (there is no picture) is indicated. as if the would not transfer that correctly.

Translated with www.DeepL.com/Translator (free version)

puppyspike
Shopify Partner
3 0 0

Ok, I think I know why this keeps outputting only the gid:

https://shopify.dev/docs/apps/custom-data/metafields/types#list-types

anyone have an idea how to convert this to a URL with liquid?