We present a 2D study of the internal extinction on (sub)kiloparsec scales of a sample of local (z < 0.1) LIRGs (10) and ULIRGs (7), based on near-infrared Paα, Brδ, and Brγ line ratios, obtained with VLT-SINFONI integral-field spectroscopy (IFS). The 2D extinction (A V ) distributions of the objects, map regions of ∼3 × 3 kpc (LIRGs) and ∼12 × 12 kpc (ULIRGs), with average angular resolutions (FWHM) of ∼0.2 kpc and ∼0.9 kpc, respectively. The individual A V galaxy distributions indicate a very clumpy dust structure already on sub-kiloparsec scales, with values (per spaxel) ranging from A V ∼ 1 to 20 mag in LIRGs, and from A V ∼ 2 to 15 mag in ULIRGs. As a class, the median values of the distributions are A V = 5.3 mag and A V = 6.5 mag for the LIRG and ULIRG subsamples, respectively. In ∼70% of the objects, the extinction peaks at the nucleus with values ranging from A V ∼ 3 to 17 mag. Within each galaxy, the A V radial profile shows a mild decrement in LIRGs within the inner 2 kpc radius, while the same radial variation is not detected in ULIRGs, likely because of the lower linear scale resolution of the observations at the distance of ULIRGs. We evaluated the effects of the galaxy distance in the measurements of the extinction as a function of the linear scale (in kpc) of the spaxel (i.e. due to the limited angular resolution of the observations). If the distribution of the gas/dust and star-forming regions in local LIRGs (63 Mpc, 40 pc/spaxel on average) is the same for galaxies at greater distances, the observed median A V values based on emission line ratios would be a factor ∼0.8 lower at the average distance of our ULIRG sample (328 Mpc, 0.2 kpc/spaxel), and a factor ∼0.67 for galaxies located at distances of more than 800 Mpc (0.4 kpc/spaxel). This distance effect would have implications for deriving the intrinsic extinction in high-z star-forming galaxies and for subsequent properties such as star formation rate, star formation surface density, and KS-law, based on Hα line fluxes. If local LIRGs are analogues of the main-sequence star-forming galaxies at cosmological distances, the extinction values (A V ) derived from the observed emission lines in these high-z sources would need to be increased by a factor 1.4 on average.