I've never been the biggest fan of Airtable's handling of attachments, but here's a quick workaround that you can use to grab the first attachment.
Here's a quick example I threw together for the sake of this post.
I have created a new Main Image attachment field that will mirror my first attachment in the Attachments field.
Next, I created a formula field with the following formula:
If you weren't already aware, when you point a formula to just return the value of an attachment field, it will return an array of attachments in the format of:
When I plug in that formula into a formula field, it will return the location of the first attachment in the array.
From here, I'll create a new automation that is triggered whenever the formula field is updated.
I'll create two conditional action groups.
The first group will fire only when the formula field is not empty. If it is not empty, then it will update the Main Image attachment field with the string value found in the Primary Attachment Link formula field.
The second group will fire only when the formula field is empty. If it is empty, then it will clear the Main Image attachment field. Since the formula will only return empty if there are no attachments in the Attachments field, we can safely assume that there shouldn't be any images displayed at all, so no cause for concern.
Here's what all the automation steps look like:
Here's what the automation behavior looks like:
This is a fast and simple way of doing it.
I highly discourage the creation and use of fields that do not serve a workflow purpose to users, as they contribute to a bloated schema and create dependencies that can otherwise be avoided.
Nonetheless, this can serve as a quick solution if you don't care about the field.