At relativistic speeds the distances contracts. What is the contraction ratio in the dimensions along the axis of travel between a static observer and a photon passing by?
This is a long recurring question, that keeps coming up again and again; and I'm not sure if it will stop doing so.
The truth is there is no "point of view" from a photon, there are no reference frames that travel with the speed of a photon, and there, moreover is not possible any consciousness or evolution of anything that travels at the speed of light.
When you try to use the Lorentz transformations to boost up to speed $c$, they explode - therefore, there is no reference frame with this speed. And how could there be? According to all inertial frames, light must be in motion - if there were a frame that could move along with light that would contradict that, in fact I believe this was one of the early thought experiments Einstein used to devise special relativity, so it is no surprise that the theory that was devised with this in mind freaks out when you try to do that. Some might try to say "the universe contracts to zero" but this isn't even right: the Lorentz transformation matrix does not become singular, it becomes undefined (it's a division by zero, and trying to make it defined by injecting "infinity" into the number system just causes the "spacetime" to collapse into a teeny little yuckey nonsensey thing so forget that.).
Furthermore, the proper time along any lightlike path - that is, any path in space-time corresponding to the motion of a photon - is zero, which means that an outside observer sees a photon's "clock as frozen", so it cannot undergo any internal evolution, nor could a being made up of photons. Thus there can be no living things (natural or artificial and for whatever definition of life you want to use) that travel at $c$. Thus nothing can experience travel at $c$ because things that travel at $c$ are not capable of undergoing experience, no matter how broadly you define that term. The domain of things that travel at $c$ is an essentially different domain than those traveling with a speed below $c$. The usual "principle of relativity" that says "all velocities are equivalent physics" really comes with a caveat: all velocities below $c$. Velocity $c$ is something else indeed.
Well, just to clarify some misconceptions. The important thing about coordinate systems along the path of photons is not what you'd observe (i.e. whether you see space contraction or not) but how those define the causal structure of spacetime (what can affect you and what cannot, and inversely what you can affect or not).
You can in fact have lightlike coordinate systems, i.e., coordinate systems which would be the path that photons or any zero mass particle follows in spacetime. They are also called null coordinates because their spacetime intervals (along them) must be zero. In fact they are very important as they are the best way to understand and visualize the causal structure of spacetime. An example and reference below.
But first, that does not mean that a photon observes anything (they don't have eyes) or that anything with mass, or any person can have that frame be their rest frames. Anything along those coordinates moves at the speed of light, and must be zero mass (due to special relativity anything massless moves at speed c).
Example: consider simply a 1+1 dimension spacetime, and take it for simplicity to be Minkowski. Then one can write the metric as
$$ds^2 = dt^2 - dx^2$$
and then defining u and v as u = t-x and v = t+x, one has that
$$ds^2 = dudv$$
See the simple explanation by @Schirmer at Penrose Diagrams Null Coordinates
u and v are null coordinates and are used to draw Penrose diagrams. They represent the light cones in 2D, with u = constant inclined to the right and v to the left, in the t>0 half plane. You can also have the t<0 half plane, which represents the past for an observer at the origin.
See for instance about Penrose diagrams at Wikipedia at https://en.m.wikipedia.org/wiki/Penrose_diagram
And one can define these kinds of null cordinates for any spacetime, including curved spacetimes. When diagrams are drawn this way it is easy to see what two events can be causally connected (if one at the origin, any others inside the light cone), or not (outside). The se kinds of diagrams are very useful to understand black holes, how the event horizon on those are not singularities, and otHer causal questions. See also more Penrose diagrams and descriptions at https://jila.colorado.edu/~ajsh/insidebh/penrose.html
So the important thing in physics is not what do photons see, or anything else going at speed c, but that those define the causal structure of spacetime, as Penrose recognized.