Gradient refractive index lens-like media are implemented using two-dimensional graded photonic crystals. They were considered as effectively homogeneous media in the long-wavelength approximation. Specified distribution of the gradient refractive index was realized using rods with spatially varying radii and applied for a design of a focusing and imaging lens. The validity of the proposed method was confirmed using full-wave numerical simulations. Planar versions of the presented lenses can find applications in integrated nanophotonics.