Coding for same image to appear on all products

Highlighted
New Member
9 0 0

I'm trying to add the same image (https://cdn.shopify.com/s/files/1/0275/3550/7591/files/WE_INSTALL_ALL_PARTS_SOLD._CALL_US_TODAY..png...) to every product page. I tried to do this using the product.liquid but it's not working. Any insight?

0 Likes
Highlighted

It would be tough to nail it perfectly without seeing your theme's product.liquid, but maybe this will help get you started:

You'll need to replace the image tag's src attribute value. It may look something like this:

 

 

<img class="featured-image" src="{{ product.featured_image | img_url: 'medium }}" alt="{{ product.title | escape }} />

 

 

 

So with the file you mentioned, it would become something like this:

 

 

<img class="featured-image" src="https://cdn.shopify.com/s/files/1/0275/3550/7591/files/WE_INSTALL_ALL_PARTS_SOLD._CALL_US_TODAY..png?v=1600715380" alt="{{ product.title | escape }}" />

 

 

0 Likes
Highlighted
New Member
9 0 0

Thank you! That gets it to appear, how do I get it under the description?

0 Likes

@BAMotorsport Sure thing, happy to help.

You'd need to modify that HTML a little bit and paste it in the the Description field after selecting the HTML editor button. It looks something like </> I think.

<img class="featured-image" src="https://cdn.shopify.com/s/files/1/0275/3550/7591/files/WE_INSTALL_ALL_PARTS_SOLD._CALL_US_TODAY..png?v=1600715380" alt="WE INSTALL ALL PARTS SOLD CALL US TODAY" />

 

Or if you want to adjust the size, change the 320px to whatever width you would like such as 1000px or 50% for example.

<img class="featured-image" style="width:320px;" src="https://cdn.shopify.com/s/files/1/0275/3550/7591/files/WE_INSTALL_ALL_PARTS_SOLD._CALL_US_TODAY..png?v=1600715380" alt="WE INSTALL ALL PARTS SOLD CALL US TODAY" />

 

0 Likes