To add a line under Portfolio Images in Squarespace, you can follow these.
#1. All Portfolio Page
Use this code to Custom CSS box
a.grid-item .grid-image {
border-bottom-width: 10px;
border-bottom-style: solid;
border-bottom-color: #f1f;
}
#2. Specific Portfolio Page
First, you need to find Portfolio Page ID.
Next, use CSS code like this
#collection-66a1bfc99041e47b896c1e48 a.grid-item .grid-image {
border-bottom-width: 10px;
border-bottom-style: solid;
border-bottom-color: #f1f;
}