Click on the edit data source icon and click on "ADD A FIELD":





Name the field and type in the formula with correct dimension (for example in FB Ads it's "Post image URL" and in Twitter Ads it's "Tweet card image URL")





And then use that custom field as your dimension: