An image forming apparatus including an image carrying member, a transfer
member, support rollers, a detecting mechanism, and a controller. The
image carrying member supported by the support rollers, forms a toner
image on its surface facing a surface of the transfer member, which
transfers the toner image to a recording medium. The detecting mechanism
includes a detection roller, a roller shaft, a moving member, and a
sensor, and detects a speed of the image carrying member. The detection
roller includes one support roller selected from the support rollers, and
is provided with the roller shaft. The moving member is directly fixed to
the roller shaft and rotates with the detection roller. The sensor
detects a moving speed of the detection roller with the moving member.
The controller controls a traveling speed of the image carrying member to
a target speed based on a detection result of the sensor.