Right way of linking something in the assets folder

Solved
stressedowner
Shopify Partner
27 1 5

In my stylesheets and script files, I've been using 

background: url('/assets/image.jpg');

which is doing great in my localhost, but not found/not appearing in the Shopify server. What's the best practice for this?

Accepted Solution (1)

Accepted Solutions
amanbatra
Shopify Partner
12 2 1

This is an accepted solution.

Hi @stressedowner  

You can use 
background: url("{{ 'image.jpg' | asset_url }}");

Is the solution works for you ? please Like and Accept Solution.
Need more help with theme customization and store development ?
WA: +917508271396, Email: amanbatra.developer@gmail.com, Skype: amanbatra.developer

View solution in original post

Reply 1 (1)
amanbatra
Shopify Partner
12 2 1

This is an accepted solution.

Hi @stressedowner  

You can use 
background: url("{{ 'image.jpg' | asset_url }}");

Is the solution works for you ? please Like and Accept Solution.
Need more help with theme customization and store development ?
WA: +917508271396, Email: amanbatra.developer@gmail.com, Skype: amanbatra.developer