Liquid, JavaScript, themes, sales channels
Hi There,
Not sure if anyone can help. I would like to add our personalised signature to the bottom of a text box on our home page (we have used an image with text section as we also need our logo displayed). I have added a screenshot and circled where we would like our custom signature image to go..
Solved! Go to the solution
This is an accepted solution.
Hi @FOP
You should edit your code.
1: Online store > themes > Actions > Edit code > Sections > image-with-text.liquid
2: add this code before '{%- when 'button' -%}'
{%- when 'image' -%}
<img src="{{ block.settings.image | image_url: width: 500 }}">
3:
add this code at last of blocks,
before code
'
],
"presets": [
'
,
{
"type": "image",
"name": "image",
"limit": 1,
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "image"
}
]
}
This is an accepted solution.
Hi @FOP
Add it at last of base.css. Please Accept this as Solution too 🙂
.section-template--14860765823108__16632434735dbb724e-padding .media>img {
object-fit: contain!important;
}
This is an accepted solution.
Hi @FOP
You should edit your code.
1: Online store > themes > Actions > Edit code > Sections > image-with-text.liquid
2: add this code before '{%- when 'button' -%}'
{%- when 'image' -%}
<img src="{{ block.settings.image | image_url: width: 500 }}">
3:
add this code at last of blocks,
before code
'
],
"presets": [
'
,
{
"type": "image",
"name": "image",
"limit": 1,
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "image"
}
]
}
Did you try it? you will get an image selector
Hi @Kani
I have just noticed that having the image below the text makes the logo on the left cut off, do you know anyway to fix this?
Obviously you changed the image width setting. Please check your settings at first.
@Kani I did play with the size in the below code although even at the default 500 the image is still cut off, do you know how I could fix this?
{%- when 'image' -%} <img src="{{ block.settings.image | image_url: width: 500 }}">
I mean I think you have changed this
If you want to help you with debug, you should share your store url、your settings etc. I can't fix issues by imagination.
@Kani i haven’t, it’s the smallest option on size. I’ve also tried uploading a smaller image but it just makes it blurry with the same issue. Although, it works fine on the mobile site.
if I remove the image from below the text it’s also okay.
ahceep
This is an accepted solution.
Hi @FOP
Add it at last of base.css. Please Accept this as Solution too 🙂
.section-template--14860765823108__16632434735dbb724e-padding .media>img {
object-fit: contain!important;
}
Hi Kani,
I face the same issue. We use the impulse theme though. Can you help me with adding a picture into a text box as well?
Thank you so much!
User | RANK |
---|---|
38 | |
28 | |
13 | |
13 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023