What are the mass and galaxy profiles of cosmic voids? In this paper, we use two methods to extract voids in the Dark Energy Survey (DES) Year 1 redMaGiC galaxy sample to address this question. We use either 2D slices in projection, or the 3D distribution of galaxies based on photometric redshifts to identify voids. For the mass profile, we measure the tangential shear profiles of background galaxies to infer the excess surface mass density. The signal-to-noise ratio for our lensing measurement ranges between 10.7 and 14.0 for the two void samples. We infer their 3D density profiles by fitting models based on N-body simulations and find good agreement for void radii in the range 15–85 Mpc. Comparison with their galaxy profiles then allows us to test the relation between mass and light at the 10 per cent level, the most stringent test to date. We find very similar shapes for the two profiles, consistent with a linear relationship between mass and light both within and outside the void radius. We validate our analysis with the help of simulated mock catalogues and estimate the impact of photometric redshift uncertainties on the measurement. Our methodology can be used for cosmological applications, including tests of gravity with voids. This is especially promising when the lensing profiles are combined with spectroscopic measurements of void dynamics via redshift-space distortions.