First, forget everything you think you know about photons. It is wrong.
A photon is the quantized interaction of an electromagnetic wave. They do not have a size. They are not particles with mass that occupy space.
As for an EM wave, the wavelength is talking about how far the wave travels during one oscillation of its electric and magnetic field vectors. There is nothing moving up and down. The little squiggly lines you see representing photons is utterly incorrect. The EM wave travels outwards like ripples on the surface of a pond, only in three dimensions, not two. If you were to measure the EM wave as it travels, you could graph the changing electric and magnetic fields on a graph. This is what you normally see when you look at anything that shows a photon or an EM wave. The distance between any crest or trough is the wavelength.