How can I add a link to an image? Dawn theme

Topic summary

A user needed to make an image in the Dawn theme’s “Image with Text” section clickable, linking to a specific product page.

Solutions provided:

  • One approach suggested wrapping the image element (with class image-with-text__media) in an <a> tag with the desired URL
  • A more detailed solution involved editing the image-with-text.liquid file by adding code above the existing image tag that loops through section blocks and checks for a button link setting

Outcome:

The issue was resolved successfully. The user confirmed the solution worked, though they didn’t specify which approach they implemented. The discussion involved modifying Liquid template files and HTML structure to add link functionality to static images.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Hey guys, how can I add a link to an image in the “Image with Text” section?

Specifically to this image:

I want it so that when I click on the image, it takes me to this page: https://1049xn-ya.myshopify.com/products/editing-masterclass

Here’s the link to my store and to the section: https://1049xn-ya.myshopify.com/

Thanks a lot!
Tim

1 Like

image-with-text__media image-with-text__media–adapt global-media-settings background-transparent media search about the dev with that class and wrap it with tag and put the link that you want

Hi @CreatorTim

Open your image-with-text.liquid file, find those line of code

{{
                section.settings.image
                | image_url: width: 1500
                | image_tag: sizes: sizes, widths: widths, fetchpriority: fetch_priority
              }}

Add this code above it

{%- for block in section.blocks -%}
                {% if block.settings.button_link != blank %}
                  product link
                {% endif %}
              {%- endfor -%}

1 Like

Thank you sm!!! Works