I have an entity that has an image field attached to it. This field can hold multiple images. I would like to be able to display a single/first image with one field formatter from this field at one place and all images with another formatter from this field in another place.
~~So I need to somehow clone this field, most likely via custom configuration to store some basic data and attaching it via hook_entity_base_field_info().
What I am not sure about is how to use the proper field type for this "computed" field so I can use proper field formatters, how to set proper source of data(the original field) and how to properly use isEmpty() method on that field so this field won't show up if the original field is empty without using my own field class to do that(since I would lose the compatiblity with proprr formatters).~~
Sorry, that was a bit misleading. I only need to be able to display the field with different formatter which means I only need another instance of that field in the entity_view_display.
hook_entity_extra_field_info() seems like the best solution, but it does not allow formatter settings.