Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Custom liquid problem

Custom liquid problem

DavidSantana11
Visitor
1 0 0

How to put a image in custom liquid

Replies 2 (2)

JonasS
Shopify Partner
73 8 12

 

<img src="replace with you img url" style="width:180px;" />

 


You can type above code like this.  And replace your image URL as the src value.

Cobo-Sf : Your needs, our speed – Together, we succeed!
Feel free to let us know what you really want to change for your client.

EcomGraduates
Shopify Partner
840 71 121

Hello there  

 

To add an image in a custom Liquid template, you can use the img tag and specify the source of the image using the src attribute. Here's an example:

 

<img src="/path/to/image.jpg" alt="Alt text describing the image">

 

You can also include other attributes, such as the width and height of the image, or specify a class for styling using the class attribute.

 

 

<img src="/path/to/image.jpg" alt="Alt text describing the image" width="500" height="300" class="my-image-class">

 

If you want to use an image file that is stored in your Shopify store's assets, you can use the asset_url filter to generate the full URL of the image file.

 

 

<img src="{{ 'image.jpg' | asset_url }}" alt="Alt text describing the image">

 

Note that the asset_url filter only works for files that are stored in the assets directory of your store.

 

hope this helps 

 

 


 If this fixed your issue, likes and accepting as a solution are highly appreciated
|  Build an online presence with our custom-built Shopify Theme: EcomifyTheme
|  Check out our reviews: Trustpilot Reviews
|  We are Shopify Partners: EcomGraduates Shopify Partner