The only time that head space is ok is during an active fermentation, the CO2 being produced will be sufficient to protect your wine, cider, mead and so forth, once wine of cider has finished fermenting, (no guess work, use a hydrometer to tell you, if you're not using one, it's only time before mistakes happen), you need to stabilize the wine or cider with Potassium Metabisulfite.
As far as what I see in your picture, I'd take one of the gallons, top off the other two and rack the rest into a 1/2 gallon jug leaving only an inch of head space.
If your hydrometer tells you that fermentation is finished, you can put solid stoppers in, no need for airlocks.