Mylar bags are not a challenge for x-rays cus it is a thin material with a low density.
The higher the density and thickness of the material, the more radiation is absorbed. Of course, energy also plays a role, but this is not a decisive factor with modern X-ray devices.
Some Mylar bags are coated with aluminium, but this is no obstacle to X-rays.