Adding custom image assets per product - metafields or another better way?

Highlighted
Tourist
7 0 2

That's really strange. The asset URL should never return a local file url like that. (https://shopify.dev/docs/themes/liquid/reference/filters/url-filters)

What do you see rendered if you remove the .text bit from the paragraph tag? 

{% assign extended-description = product.metafields.extended-description %}
<div class="product__extended-description-text">
      <p>{{ extended-description }}</p>
</div>
0 Likes
Highlighted
Excursionist
12 1 0

I see this bit of code:

{"image"=>"extended-description_product-2.jpg"}

0 Likes
Highlighted
Tourist
7 0 2

That's so strange. I've never actually seen that before.

 

As long as you have an image file named "extended-description_product-2.jpg" in your /assets folder it should be working just fine. 

0 Likes
Highlighted
Excursionist
12 1 0

I upload the extended-description_product-2.jpg to the settings > files area. I even tried a different Shopify store that I manage that uses a different theme. And I get the same results.

broken url: //cdn.shopify.com/s/files/1/0254/8134/7108/t/4/assets/extended-description_product-2.jpg?673

0 Likes
Highlighted
Tourist
7 0 2

So you you first need to go to themes -> actions -> edit code

90south_0-1597362380745.png

Then go to the assets folder and stick the image there if it isn't already. 

90south_1-1597362407900.png

 

 

0 Likes
Highlighted
Excursionist
12 1 0

It worked!! Thanks so much @90south 

0 Likes
Highlighted
Tourist
7 0 2

Nice! Happy to help @torasaki . Glad it worked : ) 

0 Likes