In a DXA View I have a Component Link field that can link to an Image or a Content Component.
While looping through the Components in the Component Link field, I want to know if it is an Image or what type of Component is in the list, and then call the render the relevant View. How is this possible?
I'm using code like this:
foreach (var component in Model.Content_components)