When a slit or hole size a is illuminated by a parallel beam, then it is diffracted at an angle of aλ.
In travelling a distance z, size of beam is azλ.
So, azλ≥a
or z≥λa2
where, z is Fresnel's distance. So, image formation can be explained by ray optics for distance less than zf.