Particle-in-cell (PIC) codes are powerful tools to self-consistently simulate laser–plasma dynamics. Recent methods enable the extraction of electromagnetic fields from PIC simulations and their propagation to a virtual screen using Fourier optics. This approach allows the generation of synthetic optical images, so called shadowgrams, which reproduce experimental diagnostics where a transverse probe beam is refracted by plasma structures and imaged onto a detector. By using field data from PIC simulations, such synthetic shadowgrams capture the full laser–plasma interaction, beyond what static ray-tracing or stand-alone finite-difference time-domain solvers can represent. However, these methods were only used in post-processing until now, and require storing large 3D field datasets, which is often impractical for large-scale simulations. To overcome this limitation, we present an in-situ plugin for the PIC code PIConGPU, which performs a Fourier time integration of 2D field slices at fixed positions, avoiding full 3D spatial Fourier transforms. This enables the creation of synthetic optical images directly during runtime (‘in-situ’) with a significantly reduced storage footprint and reduced total simulation size. We present the implementation of the in-situ optical imaging plugin. We validate the plugin against PIConGPU’s intrinsic field solver and analytic theory using a double-slit test, and demonstrate the first synthetic in-situ shadowgram generated of high-intensity laser–plasma experiments with cryogenic hydrogen-jet targets.