Wiring – How to connect a chandelier to this ceiling wiring

ceilingconnectorswiring

I just moved in to a 16 year old house and replacing a ceiling fan with chandelier. Chandelier has conventional white, black and ground. The fan was connected to red and ground only, which I guess was incorrect. How do I connect the new chandelier. Picture of the outlet attached.
enter image description here

Best Answer

You would need to test to verify, but it looks like the black is a constant hot with the red being the switch leg.

So to connect a chandelier you'd use the red (hot), white (neutral) and ground.