Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: How to center an image output by a metafield in a custom liquid block

Solved

How to center an image output by a metafield in a custom liquid block

YAJones
Excursionist
13 1 0

Can anyone help me center (and adjust the size of) an image that has been output onto a product page using a metafield in a custom liquid block?

 

This is what I currently have in the custom liquid block:

 

{{ product.metafields.custom.display | metafield_tag }}

Thanks in advance.

Accepted Solution (1)
YAJones
Excursionist
13 1 0

This is an accepted solution.

OK I found the solution and I'm kinda ashamed to say it, but regular HTML 'center' tags will center the image.

 

<center> object </center>

 

View solution in original post

Replies 3 (3)

customall
Shopify Partner
6 0 0

Hello @YAJones 
Can you send me your site url?

Please let me know if it works by giving it a Like or marking it as a solution!

Customall Product Personalizer

Customall: Enhance productivity with seamless personalized product creation
YAJones
Excursionist
13 1 0

Thanks for replying @customall. I could do that, but the theme I'm working on is still unpublished...

YAJones
Excursionist
13 1 0

This is an accepted solution.

OK I found the solution and I'm kinda ashamed to say it, but regular HTML 'center' tags will center the image.

 

<center> object </center>