The nearby radio galaxy M87 is a prime target for studying black hole accretion and jet formation1,2. Event Horizon Telescope observations of M87 in 2017, at a wavelength of 1.3 mm, revealed a ring-like structure, which was interpreted as gravitationally lensed emission around a central black hole3. Here we report images of M87 obtained in 2018, at a wavelength of 3.5 mm, showing that the compact radio core is spatially resolved. High-resolution imaging shows a ring-like structure of [Formula: see text] Schwarzschild radii in diameter, approximately 50% larger than that seen at 1.3 mm. The outer edge at 3.5 mm is also larger than that at 1.3 mm. This larger and thicker ring indicates a substantial contribution from the accretion flow with absorption effects, in addition to the gravitationally lensed ring-like emission. The images show that the edge-brightened jet connects to the accretion flow of the black hole. Close to the black hole, the emission profile of the jet-launching region is wider than the expected profile of a black-hole-driven jet, suggesting the possible presence of a wind associated with the accretion flow.