Generally, differentiation can be seen a a special case of convolution.
In sampled images, and discrete signals in general, differentiation is made in a discrete manner: it becomes a discrete approximation of what you'd get if the images were continuous. The classical sampling context is linear, convolution reflects linearity, and a lot of classical discrete derivatives are linear combinations of pixel values. So, those derivatives can be implemented as convolutions, and convolutions commute.
In other words: as derivation may emphases noise, some believe that one should filter or smooth data before applying a derivative kernel. But with linear filters and derivatives, you can use any order, and you can even combine then into a single "smoothed derivative" operator.
However, remember that image processing sometimes uses non-linear derivatives or gradient estimators. In those cases, they don't communte with convoluton anymore.