Magnetoelastic coupling and uniaxial pressure dependencies of the ferromagnetic ordering temperature in the quasi-two-dimensional layered van der Waals material CrI3 are experimentally studied and quantified by high-resolution dilatometry. Clear anomalies in the thermal expansion coefficients at T-C imply positive (negative) pressure dependencies partial derivative T-C/partial derivative p(i) for pressure applied along (perpendicular to) the c axis. The experimental results are backed up by numerical studies showing that the dominant, intralayer magnetic coupling increases upon compression along the c direction and decreases with negative in-plane strain. In contrast, interlayer exchange is shown to initially increase and subsequently decrease upon the application of both out-of-plane and in-plane compression.