Below is a comparison of the 767, 787, and A350 main landing gear. The larger distance on the 767 also appears to make the airplane lower to the ground.
The Boeing 767 main landing gear is not actually spaced further apart than other twin-engine wide-bodies:
|Aircraft||Wingspan||Gear Spacing||Fuselage Width||Gear Spacing:Fuselage Width|
|B767||48 - 52 m||9.3 m||5.03 m||1.85|
|B777||61 - 65 m||10.97 m||6.2 m||1.77|
|B787||60 m||9.8 m||5.77 m||1.70|
|A330||60 - 64 m||10.68 m||5.64 m||1.90|
|A350||65 m||10.6 m||5.96 m||1.78|
As you can see, the 767 has the shortest gear spacing of all of these aircraft. What creates the illusion of a wider spacing, is the much smaller wingspan of the 767 and the smaller fuselage width compared to the others. You said "airplanes of a comparable size" in your question, but they are really not. The 767 is considerably smaller.
What typically determines the needed gear spacing, is the required engine ground clearance, especially when the aircraft is rolling just after takeoff or just before landing.
The reason why the main landing gear appears to be "narrower" in the second and third photo is Perspective Distortion: when the photographer is standing very close to the airplane, the parts that are closer to them (e.g. the front part of the fuselage, the nose wheel) will appear larger than the parts that are further away (e.g. the main landing gear, including the distance between the left and right gears). If you look closely, you will notice that in the 787 photo, the nose gear tires appear larger than those on the main gear, which they are obviously not. The 767 photo is taken from the other end of the runway with a strong zoom lens, that's why the perspective is "flattened" and all the elements of the airplane are at the same scale. If you look at 787 and A350 images taken from a similar perspective, the landing gear appears spaced further apart: