The cuprate superconductors exhibit ubiquitous instabilities toward charge-ordered states. These unusual electronic states break the spatial symmetries of the host crystal, and have been widely appreciated as essential ingredients for constructing a theory for high-temperature superconductivity in cuprates. Here we report real-space imaging of the doping-dependent charge orders in the epitaxial thin films of a canonical cuprate compound La2-xSrxCuO4 using scanning tunneling microscopy. As the films are moderately doped, we observe a crossover from incommensurate to commensurate (4a0, where a0 is the Cu-O-Cu distance) stripes. Furthermore, at lower and higher doping levels, the charge orders occur in the form of distorted Wigner crystal and grid phase of crossed vertical and horizontal stripes. We discuss how the charge orders are stabilized, and their interplay with superconductivity.