The advent of new technologies, such as augmented reality (AR), autonomous driving, computer vision, and many other emerging techniques, requires on-the-fly processing of large data files, such as images, at an increasing rate. Image processing is usually performed digitally but the speed and power consumption limits of standard microelectronic components have become a true bottleneck. Analog optical processing provides a promising route that may overcome these limitations. Also, processing signals in the optical domain enables massive parallelization and may potentially avoid unnecessary analog-to-digital conversion. We introduce different metasurface-based platforms that perform image processing tasks or solve complex mathematical problems within a form factor that remains on-chip amenable. In fact, all-optical processing is not meant to replace digital computing but rather to ease its burden, paving the way for hybrid optical and electronic data processing. To achieve this, we design and demonstrate experimentally all-optical processing metasurfaces that are sub-wavelength in thickness and work in transmission with significantly larger and practical NA, further facilitating application into standard imaging systems (e.g. smartphone cameras). Furthermore, we explore the possibility of tuning the operation imparted on an input signal in a CMOS compatible configuration. Next, we apply the concept of a wave base integral solver to the optical wavelength range. This, in turn, implies a drastic footprint reduction and thus, again, makes the device on-chip amenable. Moreover, smaller size results in an increased processing speed as light has to travel shorter distances. Finally, we apply the gained knowledge about gratings to demonstrate a nanophotonic light trapping scheme aimed at boosting the efficiency of high-performance III-V/Si triple-junction solar cells.