How to add an image

Tourist
27 0 0

Hi,

 

Can anyone help ? I'm trying to add an image in the product template.

 

What is the best way to add the code?

 

Something like this .. <img src="relative image path"....?

 

Or is there a better way?

0 Likes
New Member
4 0 0

What themes you use?

 

You can use this for calling image url

<img class="featured-product__image lazyload" src="{{ image | img_url: '300x'}}">

300x is width of image, you can change with another size

0 Likes
New Member
4 0 0

Hi 

You can try this:

Upload your image to Assets folder in your theme then use this following code:
<img src="{{ 'image.jpg' | asset_url }}" />

0 Likes
Highlighted
Tourist
27 0 0

Thanks guys.

 

What would I add to the code to make the image full width?

0 Likes
New Member
4 0 0

<img src="{{ 'image.jpg' | asset_url }}" />

if you this code, it doesn't limit the image width

0 Likes