Here is a description of what is happening in this photo from Reddit:
This is called a dirty thunderstorm.
A study in the journal Science indicated that electrical charges are generated when rock fragments, ash, and ice particles in a volcanic plume collide and produce static charges, just as ice particles collide in regular thunderstorms. Volcanic eruptions are sometimes accompanied by flashes of lightning. However, this lightning doesn’t descend from storm clouds in the sky. It is generated within the ash cloud spewing from the volcano, in a process called charge separation.
The image most probably has some exposure time to catch this many flashes of lightning. It doesn't require many seconds to make this picture possible though, considering that dirty thunderstorms' charged and colliding ash and stone particles generates a lot more flashes of lightning than a regular storm.
It's pictures like this that keep me in awe of what our planet is capable of. Nothing like a pissed off volcano spewing out lava and lighting to put me in my place.