Idler pulleys need to be flat bottomed. You'll also usually need something to retain the chain if it goes slack.
The bolt underneath is in the right place to allow the chain to be fed onto the pulleys but won't allow the chain to jump off. Those pulleys started as U shaped rope pulleys with a 10mm bearing which are common and cheap on ebay. Using a bolt, penny washers and a nut they were made flat in a lathe. A drill and a wood chisel would probably give the same result. Flat bottomed pulleys are rather scarce. Generally keep the diameter high. Tight turns put much more strain on the pulleys. I'd suggest 3" or bigger. If the turn is acute then bigger still. If it's a very shallow deflection of the chain you'll get away with less.
These ones are flat bottomed but 15mm bearing. You could use a 15mm to 12mm adapter from a MTB front axle for a couple of £ off ebay then use a M12 bolt or slide some 15mm o/d tube through with a 10mm i/d for a M10 bolt.