In traditional transit timing variations (TTVs) analysis of multi-planetary systems, the individual TTVs are first derived from transit fitting and later modelled using n-body dynamic simulations to constrain planetary masses. We show that fitting simultaneously the transit light curves with the system dynamics (photo-dynamical model) increases the precision of the TTV measurements and helps constrain the system architecture. We exemplify the advantages of applying this photo-dynamical model to a multi-planetary system found in K2 data very close to 3:2 mean motion resonance, K2-19. In this case the period of the larger TTV variations (libration period) is much longer (>1.5 years) than the duration of the K2 observations (80 days). However, our method allows to detect the short period TTVs produced by the orbital conjunctions between the planets that in turn permits to uniquely characterise the system. Therefore, our method can be used to constrain the masses of near-resonant systems even when the full libration curve is not observed.