This paper reports a special device called a `speckle suppressor', which contains a highly porous nanoberyllium plate squeezed between two beryllium windows. The insertion of the speckle suppressor in an X-ray beam allows manipulation of the spatial coherence length, thus changing the effective source size and removing the undesirable speckle structure in X-ray imaging experiments almost without beam attenuation. The absorption of the nanoberyllium plate is below 1% for 1 mm thickness at 12 keV. The speckle suppressor was tested on the ID06 ESRF beamline with X-rays in the energy range from 9 to 15 keV. It was applied for the transformation of the phase-amplitude contrast to the pure amplitude contrast in full-field microscopy.