How to resize an image for mobile in a custom liquid section?

Hey,

I have an image that I’ve placed in my custom liquid section on Shopify.

The image is the correct size on desktop but on mobile its way too small.

How can I fix this?

For easy to check your issue, you can provide store’s url here, if your store is protecting by password you can provide too.

About your issue i think you can fix it via css.

Hey Joseph https://gigachew.com.au/password

Password: lytral

On the mastic gum page

Hi @LiamP191

You can solve it by adding this CSS code in Custom CSS of that image section in your product customize

@media screen and (max-width: 749px) {
  .img {
    width: 100% !important;
  }
}

Hey Dan,

I did what you said but it didn’t do anything.

Please see

screenshot

Sorry, my bad. Please update code like this

@media screen and (max-width: 749px) {
  img {
    width: 100% !important;
  }
}

Thank you so much for helping Dan!

1 Like

Happy I could help :blush: !

1 Like

Hey Dan,

IF you know why possibly you could help with this too.

On my home page there are images that go blurry when In mobile view.

Is that something you know how to fix?

Which ones?

It might only be in the mobile editor on desktop, here it is though.

Hello Dan,

I am having the same issue, Gharfurniture.com

You can see on the home page many of the images are not sized to fit mobile version - I tried adding the code to the Custom CSS of the Slideshows but it did not work. Can you please help! Thank you :slightly_smiling_face:

Hi @Jayzeeforshort

Unfortunately, I cannot access to your store.

Hi, can you please try again:

https://www.gharfurniture.com/

I am unsure why that keeps happening sometimes

Hi @Jayzeeforshort

You are using background image for your section. You can try to add this code to theme.liquid file after to check


Hello is this right if so it did not work - is there a better way to go about it if not background? I assumed it was part of my slideshow image

Code updated.