Controlled delivery systems are widely used formulations in the pharmaceutical industry. Binding the active pharmaceutical ingredient (API) into the drug delivery system can solve some disadvantages of regular oral dosage forms. The simplest controlled delivery systems are polymeric matrices mixed with the API and excipients, further directly compressed into the tablet. Hydrophilic polymeric matrices create a gel layer after contact with a dissolution medium. This gel layer represents the regulation mechanism of the API liberation (by influencing the water penetration into the solid core of the tablet, its diffusion through the gel layer, the drug particle dissolution and the diffusion through the gel layer or the polymer chain disentanglement). Despite the remarkable accomplishments in this field of study, there are still a lot of unknowns in the design of swellable drug delivery systems. It is complicated to produce the final formulation with desired dissolution profile of the API. It often requires the previous optimization of the matrix composition and of the production process. For that reason more studies and implementation of new technologies are required. In our research, we implemented magnetic resonance imaging (MRI). It is a novel method in this field of research offering us the possibility to visualize the dissolution and swelling process in real time, non-destructively and in situ. The information obtained from image analysis, such as the kinetics of the gel layer creation could be the key for better understanding of the formulation-property relationships. The samples used in our study were binary mixtures of Hydroxypropyl Methylcellulose and carnauba wax (hydrophobic excipient). For MRI measurements a flow-through cell and a tablet holder were designed and manufactured by 3D printing. The experiments were performed under the specific conditions (phosphate buffer saline; pH 6, 37 degrees C; flow rate of medium at 4 ml/min). To improve the visibility of the erosion front, contrast agent - composite magnetic nanoparticles SiO2/FeOx were used. For the better insight into the mechanisms of drug liberation, the dissolution studies of formulations with the addition of a highly soluble API (Levetiracetam) were conducted. The data obtained were used in mathematical calculations and interpreted.