How to add Image under Add to Cart

To add Image under Add to Cart button in Squarespace, You can use this code to Code Injection > Footer.

If code doesn’t work, you can comment below, message or email me.

<script>
const imageURL = 'https://cdn.pixabay.com/photo/2025/01/17/16/06/building-9340309_1280.jpg';
let addToCartButton = document.querySelector('article.ProductItem div.sqs-add-to-cart-button');
if (addToCartButton) {
 let img = document.createElement('img');
 img.src = imageURL;
 img.className = 'custom-img';
 addToCartButton.parentNode.insertBefore(img, addToCartButton.nextSibling);
}
</script>
<style>
  img.custom-img {
    margin-top: 30px;
    max-width: 350px;
}
</style>

Remember to change Image URL.

Result

1 Like