Solved

How to create the shopify Product metafield definitions image file type

AvidBrio
Shopify Expert
295 17 29


how to create and use the product image meta fields 

Product metafield definitions.png

{% if product.metafields.my_fields.product_for_only_oily_skin_img != blank %}
    
    <img src="{{ product.metafields.my_fields.product_for_only_oily_skin_img }}" alt="    {{  product.metafields.my_fields.product_for_only_oily_skin_tx }}">    
    {{  product.metafields.my_fields.product_for_only_oily_skin_tx }}
  {% endif %}
If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
Accepted Solution (1)

ISKPRO
Shopify Partner
4 1 2

This is an accepted solution.

Hi @AvidBrio ,

As shopify upload all files on CDN so you have to use img_url filter for getting the image CDN path. you can use the below code for image url
{{ product.metafields.my_fields.product_for_only_oily_skin_img | img_url:"master" }}

Thanks,
ISKPRO

For Design, Development and custom changes Hire Me.
If your problem solved then Like & Accept this Solution.
Email ID: shopify@iskpro.com

View solution in original post

Replies 4 (4)

ISKPRO
Shopify Partner
4 1 2

This is an accepted solution.

Hi @AvidBrio ,

As shopify upload all files on CDN so you have to use img_url filter for getting the image CDN path. you can use the below code for image url
{{ product.metafields.my_fields.product_for_only_oily_skin_img | img_url:"master" }}

Thanks,
ISKPRO

For Design, Development and custom changes Hire Me.
If your problem solved then Like & Accept this Solution.
Email ID: shopify@iskpro.com
andauser
Explorer
69 0 35

Hello,

I am having the same problem. In which section do I need to paste this code?

AvidBrio
Shopify Expert
295 17 29

@andauser   can you post here your code snippet and problems statement 

If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
andauser
Explorer
69 0 35

Thank you @AvidBrio , I have solved my problem using instructions of my theme provider.

 

Best regards,

Ayse