I recently bought a new camera that has a choice between using a mechanical shutter or an electronic shutter. (A Panasonic FZ300 if it matters.) I tried taking a few pictures each way and I see no obvious difference. I presume if one or the other was unquestionably superior, they wouldn't bother making it a choice but would just use the better one. (Well, maybe not. Like maybe a new technology is clearly better but there are stick-in-the-muds who want to do it the way they did it 50 years ago. :-) So what are the pros and cons? Are their circumstances where one is better but other circumstances the other is better? Which do you prefer and why?
Fujifilm has a nice summary of the issues with each.
Electronic Shutters (ES) have some interesting characteristics due to the way the image is read out of the sensor.
Moving objects can be distorted, fluorescent/LED lights can leave light and dark bands across the frame, and ES can't usually be used with flash. On the plus side ES can have very high shutter speeds, are silent, and don't vibrate the camera.
Mechanical shutters (MS) can use flash and are better at freezing fast moving objects without distortion.
I use MS for most situations and switch to ES when I want a silent shutter or I'm doing macro work on a tripod.
One problem with electronic shutter is that it's sometimes combined with mechanical shutter, so that there's electronic first curtain (simple to implement, just gradually release the photosites at the same rate the second mechanical curtain would move) and mechanical second curtain. This results in odd-shaped background blur.
Pure electronic shutter today tends to suffer from more rolling shutter than purely mechanical shutter or electronic first curtain + mechanical second curtain. The reason is that they way the electronic shutter curtain is implemented, is that the photosites are read. They can't be read currently at fast enough speed. The first curtain has to match the second curtain too so it must also be artificially slowed down. This will surely change in 10-20 years or so: global electronic shutter will likely appear first in more expensive cameras and then in all cameras.
Electronic shutter can eliminate the camera shake from the mechanical shutter curtains, although electronic first curtain + mechanical second curtain will eliminate it well enough (the second curtain only causes very minor shake at the end of the long exposure, a small fraction of the exposure whereas the shake from mechanical first curtain can continue during the entire exposure).
Also the slow-moving second curtain means flash sync speed is so slow you can't practically use purely electronic shutter with flash.
Electronic shutter is completely silent. That may be a benefit. Also, electronic shutter tends to give you more frames per second, albeit with horrible rolling shutter.
The shutter speed with electronic shutter can be faster but do note you're fooling yourself: the curtains move very slowly and even though you may think fast shutter speed results in fast exposure, it does not due to the rolling shutter effect. So for example photographing flying birds where you'd normally use fast shutter speed is not recommended with electronic shutter due to the rolling shutter. However, photographing portraits wide open with a fast lens in sunlight where you also use fast shutter speed can be done with electronic shutter and the shutter speed benefit can be useful there. Also if both curtains are electronic the odd-shaped background blur effect doesn't appear.
No one else has yet mentioned that many cameras which offer both options reduce raw bit-depth when the electronic shutter option is chosen in order to increase frame rates beyond what the mechanical shutter is capable. This is typically from 14 bit to 12 bits and it results in a lowered measurable dynamic range, especially at base ISO, which is where most people concerned about maximizing dynamic range like to shoot.
In the beginning, all shutters were completely mechanical. There were no electronics involved at all. The advantage of a purely mechanical shutter is that there are no electronics components that can fail and the shutter can fire without batteries.
Purely mechanical shutters are typically limited to about 1/1000 second. Though some are faster.
The first electronic shutters used electrical magnets to fire the curtains. This made higher shutter speeds easier to achieve at the expense of electronic complexity and dependencies on batteries.
It might be clearer to call these electro-mechanical shutters. They readily achieve speeds of 1/4000 to 1/8000 second. They are often capable of arbitrary speeds such as 1/725 second to provide more precise exposure.
Electro-mechanical shutters were available on film cameras and are usually what is meant by “mechanical shutter” on a digital camera today.
A purely electronic shutter is possible with many digital cameras. No actual shutter needs to be involved, the sensor is simply activated and the data read out after the desired period of time. Such shutters are capable of achieving very high speed usually limited by practical considerations...there are not many ordinary situations where a shutter speed greater than 1/20,000 second is useful.
Each design consists of tradeoffs. And each is good enough for most still photography scenarios. Purely electronic shutters are very useful for video at 24, 30, 60 or more frames per second where common stills camera electro-mechanical shutter designs might struggle and purely mechanical stills camera shutter designs are unsuited.
With a mechanical shutter, you can point your camera directly at the sun and nothing will happen for at least some time. For an electronic shutter, you will burn a hole in your sensor rather quickly. More details on the sun damage are here: Can the sun damage the camera sensor? Under what conditions? but generally, in outdoors in a daytime if you are not sure, then you should go for a mechanical or mechanical-electronic shutter to limit the risk of sensor over-exposure to sunlight.