Mounting a dynamo like your picture 4 could hurt or kill somebody if it fails in traffic.
Pic 4 is also not the dynamo I received. (The other 3 pictures are accurate.)
The dynamo can be mounted safely, but take extreme care that it is not placed so it can stop the bike and send you flying into the pavement teeth first - if it falls off and gets caught in your wheels.
Please read up on the pros and cons of various mounting locations. Many European bikes come with a mount already welded on. Thats the most secure way to mount them. Place it carefully and don’t get hurt by a flimsy mount - check that its tight and tighten periodically that its not coming loose.