Macro and Landscape photographers beware! Diffraction happens when you’re trying to get the maximum depth of field and complete image sharpness. You’ll read, and correctly so, that as you decrease your aperture (higher f/numbers) you increase your depth of field enabling you to get foreground and background elements of a scene in focus. What you may not read is that if you decrease your aperture past a certain point you will actually make the entire scene softer, defeating the purpose. Diffraction causes a loss of sharpness and/or resolution at higher f/stops.
What is Diffraction?
Diffraction is the light that disperses from the diaphragm blades of your aperture and hit the image sensor in your camera. The smaller your aperture (higher f/number) the more light that disperses and causes your images to soften. The larger your aperture (smaller f/number) the smaller percentage of dispersed light that hits your image sensor causing your images to look sharp (though this decreases your depth of field).
What do you do?
Unless maximum depth of field is needed I’d recommend avoiding an aperture smaller (larger f/number) than f/8, you’ll see a noticeable difference in image clarity any higher than this. You’ll also want to spend a few hours finding the Sweet Spot for the lenses you own. All you need to do is start at your largest aperture and work your way up one stop at a time, snapping a picture at each interval, and reviewing the images for each lens to see when the sharpness starts to visibly decline. Right before the image sharpness declines would be your “sweet spot”.
Like most everything in life, you’re going to have to compromise when trying to achieve maximum depth of field as well as maximum image sharpness. Avoid the narrowest aperture on your lens otherwise you’ll end up with softer images. Finally, you’ll want to test each of your lenses to see what point they are affected by diffraction. And never feed Gremlins after midnight… (that’s only funny if you saw the 1984 Gremlins movie)