Adding Click Link To Custom Content Image

Hi @Sadea

Yes you can follow @Dan-From-Ryviu 's answer or follow this if want to keep existing section.

  1. open custom-content.liquid section and find “type”: “image_picker” , it will look like this

  1. Now add below code just above " { “type”: “image_picker”, so it will look like below image
{
   "type": "url",
    "id": "img_link",
    "label": "Image link"
},

  1. Now find below line of code:

{% assign img_url = block.settings.image | img_url: ‘1x1’ | replace: ‘1x1.', '{width}x.’ %}

and add this code just below it

and add </a> after img tag close. it mean you have to add image tag withing this tag. it will look like below

image tag -codifyinfotech.PNG

Now save it and open theme editor where you can see Link box to add link image wise

Best regard

1 Like