How do you make image clickable in refresh theme

Topic summary

Users are seeking to make images clickable in Shopify’s Refresh theme, specifically within the image-with-text section to redirect customers to product pages.

Proposed Solutions:

  • layoutbase suggests editing sections/image-with-text.liquid, wrapping the image tag with conditional link code using block.settings.button_link
  • BSS-Commerce recommends adding a URL field to the schema settings and wrapping the image code with an anchor tag using section.settings.image_link
  • omersharon shares a simpler working implementation: add an image_link URL field to the schema, then wrap the image placeholder code with <a href="{{ section.settings.image_link }}" target="_blank"> tags

Issues Encountered:

  • One user reported the image became oversized after applying the code
  • layoutbase provided follow-up instructions to remove and replace specific code lines to fix sizing issues

Current Status:

The discussion remains open with multiple working solutions proposed. The simpler method from omersharon appears most straightforward, requiring only schema modification and adding anchor tags around the image code. Screenshots and code snippets are provided throughout to guide implementation.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

hello i need help with attaching a link to an image with text.
I would like the image to be clickable so it redirects the customer to the page of the product. is it possible?
i have found only old posts on this topic and they didnt really work for me.
if anyone can help ill be really happy. thank you all in advance.
my store: https://resolvekicks.cz/
password: kundaaa

Hi @skilrexxx ,

Unfortunately, we weren’t able to access your store with the provided password. However, let us suggest some edits for you:

  1. Go to Online StoreThemeEdit code
  2. Find sections/image-with-text.liquid
  3. Find the img tag, then replace it with the code below
{% if block.settings.button_link != blank %} {% endif %} 
          
          {% if block.settings.button_link != blank %} {% endif %}

Example below:

Hope this works out for you.

Cheers,

Layoutbase - Drag & drop pagebuilder

Hi @skilrexxx

Please follow these steps:

  • Go to Online store => Theme => Edit code, find the file image-with-text.liquid. Add the following code to schema → settings, as shown below:
{
   "type": "url",
   "id": "image_link",
   "label": "Image link"
}

  • Find the code:

        {%- if section.settings.image != blank -%}
          {%- capture sizes -%}(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 | divided_by: 2 }}px, (min-width: 750px) calc((100vw - 130px) / 2), calc((100vw - 50px) / 2){%- endcapture -%}
          {{ section.settings.image | image_url: width: 1500 | image_tag:
            loading: 'lazy',
            sizes: sizes,
            widths: '165, 360, 535, 750, 1070, 1500'
          }}
        {%- else -%}
          {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
        {%- endif -%}
      

Replace it by:


      

        {%- if section.settings.image != blank -%}
          {%- capture sizes -%}(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 | divided_by: 2 }}px, (min-width: 750px) calc((100vw - 130px) / 2), calc((100vw - 50px) / 2){%- endcapture -%}
          {{ section.settings.image | image_url: width: 1500 | image_tag:
            loading: 'lazy',
            sizes: sizes,
            widths: '165, 360, 535, 750, 1070, 1500'
          }}
        {%- else -%}
          {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
        {%- endif -%}
      

    

  • Save it and then go to Online Store → Theme → Customize. Click on the image to see the input box to enter the path

The above guide only applies to the Image with text section. You can do the same with the slideshow by editing the slideshow.liquid file.

hello i applied the code. the link works but the image turned out massive, take a look
https://resolvekicks.cz/
is there a way to set it as before?

Hi @skilrexxx ,

Sorry to hear that happened. May I suggest these steps:

1. remove the line:

{% if block.settings.button_link != blank %} {% endif %}

- add the following close tag:


2. Remove the line:

{% if block.settings.button_link != blank %} {% endif %}

Replace with:

{% if block.settings.button_link != blank %}  {% endif %} 
          

i was on the same issue in my refresh theme. I tried what’s advised here , it didnt work for me as is, but i finally made it work, with much simpler implementation.

  1. go to image-with-text.liquid (all happens here)

  2. add this part to the schema part of the code under "settings (this will add a link imput field in the UI :disappointed_face:

{
“type”: “url”,
“id”: “image_link”,
“label”: “Image link”
},

once pasted, should look like this:

  1. now just add this one row: " " for the link to work, it will open the link in a new tab, if you want it in the same tab remove the " target=“_blank”.

where to put it: look for the {%- else -%}
{{ ‘detailed-apparel-1’ | placeholder_svg_tag: ‘placeholder-svg’ }}
{%- endif -%} and put it just above it.

once pasted, should look like this

that’s my contribution to this great community, i hope it works for you.

hi can you help me with this? which code is it?