Jump to content

[Share] Change image to another image on mobile

Recommended Posts

(This for Image Block only)

#1. First, you install this free tool and find Image Block ID.

https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff

In my example, we will have

#block-yui_3_17_2_1_1711699792160_2223

change-image-mobile1-min.png.bde7fcca6db60b4567cb096a8e6b1455.png

#2. Use this code to Website > Website Tools > Custom CSS.

Replace Pixabay with your mobile image url.

@media screen and (max-width:767px) {
  #block-yui_3_17_2_1_1711699792160_2223 img {
    content: url(https://cdn.pixabay.com/photo/2022/01/07/01/21/girl-6920625_1280.jpg);
  }
}

change-image-mobile2-min.png.19b6a5f6c078280b3e4d82e9a006f210.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • Replies 0
  • Views 313
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.