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.

Best Approach to Adding Images to Header

Solved

Best Approach to Adding Images to Header

Abdi_Issak
Shopify Partner
44 7 7

I want to be able to add images to my header section utilizing the Theme Editor's section settings. Would the best approach be to use section blocks to accomplish this? I plan on looping through the blocks and extract images based on identifying information like an id. Below is what I am trying to accomplish, notice the different images per Navigation (Women, Men).

Screen Shot 2022-03-22 at 10.19.31 AM.pngScreen Shot 2022-03-22 at 10.19.43 AM.png

Nashville, Tennessee based Shopify Theme Developer.
My contact information:
Email: aissak717@gmail.com
Accepted Solution (1)

Abdi_Issak
Shopify Partner
44 7 7

This is an accepted solution.

I found a solution to my question, I used the text input setting as a reference point to render images based on the string value. I was previously using the images.alt value but that kept giving me issues after saving the theme editor.

 

{% block.settings.text contains link.title %}

 

// render image

 

Nashville, Tennessee based Shopify Theme Developer.
My contact information:
Email: aissak717@gmail.com

View solution in original post

Reply 1 (1)

Abdi_Issak
Shopify Partner
44 7 7

This is an accepted solution.

I found a solution to my question, I used the text input setting as a reference point to render images based on the string value. I was previously using the images.alt value but that kept giving me issues after saving the theme editor.

 

{% block.settings.text contains link.title %}

 

// render image

 

Nashville, Tennessee based Shopify Theme Developer.
My contact information:
Email: aissak717@gmail.com