KHARKIV, Ukraine — Fed up with the lifeless and unflattering photographs taken of him by press photographers, Gennady A. Kernes, the mayor of Kharkiv, decided to take matters into his own hands.

He and his staff created an Instagram account that presented Mr. Kernes the way he wanted to be seen: flexing shirtless in the gym, cuddling some of his 27 dogs and assorted birds and other animals, and bathing in an ice-cold nature preserve as he flashed a trademark peace sign.

He was running during his cross-fit training regimen in a city park on Monday when a would-be assassin’s bullet tore through his chest, missing his heart by millimeters and leaving Mr. Kernes fighting for his life at a hospital. He survived surgery but remained unconscious and in critical condition Monday night. No arrests were made.

It may never be known who shot Mr. Kernes in the back. Municipal officials and a member of his security detail said Mr. Kernes was struck by a sniper’s bullet fired from a considerable distance. An unabashed critic of both sides in eastern Ukraine’s simmering conflict, he had plenty of enemies.