How to display the alt/title tag of images in CMS

Interesting idea. What’s the use case? If it’s accessibility, you’re going to have issues with using tool tips, as they are notoriously difficult to do well.

You will need a field from the CMS, but it might not have to be new. If it’s the name of the person in the photo, for example, you’ll likely have that. But that might not be great alt text, because in this case it’s redundant if you also show the name to sighted users.
Then making the tooltip would be a case of creating an interaction on the image to “Show” a textfield.