I might recommend breaking out images into a separate table, then create a linked record field between the images table and your original table here.
In the images table, you can create something to signify the primary image (maybe a Single-select field with different numbering options, a Checkbox field, etc.) and then in your original table, I'd create two Lookup fields to the images table: one to your attachments field that is filtered only to records that are designated primary, and another to all the attachments belonging to child image records.