By default, WordPress allows to add an extra class to the image via Advanced Options section: https://cloudup.com/cBR2yxukXm9
If I know the image (attachment) ID then how can I get this value?
I tried get_post_meta function but it did not show me that extra class. So, I am assuming I need to use an another function to retrieve the value.
.custom-class { your styles here }
in your style file.