An image-recording device includes a conveying portion, a carriage, a recording head, a sensor, and an edge-detecting portion. The carriage reciprocates along a scanning direction. The recording head is supported on the carriage. The sensor is supported on the carriage at a position shifted from the recording head in the scanning direction and upstream of the recording head in the conveying direction, the sensor being capable of detecting presence of the recording medium. The edge-detecting portion controls the sensor to detect at least one of a leading edge and a trailing edge of a recording medium.