An image forming apparatus comprising: a housing including a first wall portion extending in a vertical direction, a second wall portion extending in the vertical direction on a side opposite from the first wall portion, and an internal space formed between the first wall portion and the second wall portion; an image forming portion that is disposed in the internal space and configured to form an image on a sheet; a sheet cassette configured to be inserted from the first wall portion into the internal space in an insertion direction intersecting the first wall portion, to be attached to the housing in a protruding manner from the second wall portion to the outside of the housing, to open at a top thereof, and to accommodate the sheet therein; an opening portion that is formed in the second wall portion and through which the sheet cassette passes; and a cover member configured to, in a first state in which the sheet cassette is not attached to the housing, to seal the opening portion and to form part of the second wall portion, and, in a second state in which the sheet cassette is attached to the housing, to pivot by being abutted by part of the sheet cassette and to cover a top of a portion of the sheet cassette that is exposed to the outside of the housing, wherein in the first state, the cover member seals the opening portion with a first length in the vertical direction, and, in the second state, the cover member covers the top of the sheet cassette with a second length that is greater than the first length in the insertion direction, characterized in that the cover member further includes: a first plate that extends in the vertical direction, and includes, on an upper end side thereof, a pivot portion serving as a pivot for the pivoting of the cover member in the first state, and; a second plate including a first energizing portion configured to be energized by the sheet cassette, extending along the first plate, and to being slidable relative to the first plate, and the sheet cassette configured to include an abutting portion having a first abutting surface capable of abutting the first energizing portion of the second plate, and the cover member configured to be pivoted about the pivot portion by the sheet cassette abutting the cover member, and the second plate configured to slid relative to the first plate and the cover member configured to be extended from the first length to the second length by the first abutting surface of the sheet cassette abutting the first energizing portion of the second plate. a housing including a first wall portion extending in a vertical direction, a second wall portion extending in the vertical direction on a side opposite from the first wall portion, and an internal space formed between the first wall portion and the second wall portion; an image forming portion that is disposed in the internal space and configured to form an image on a sheet; a sheet cassette configured to be inserted from the first wall portion into the internal space in an insertion direction intersecting the first wall portion, to be attached to the housing in a protruding manner from the second wall portion to the outside of the housing, to open at a top thereof, and to accommodate the sheet therein; an opening portion that is formed in the second wall portion and through which the sheet cassette passes; and a cover member configured to, in a first state in which the sheet cassette is not attached to the housing, to seal the opening portion and to form part of the second wall portion, and, in a second state in which the sheet cassette is attached to the housing, to pivot by being abutted by part of the sheet cassette and to cover a top of a portion of the sheet cassette that is exposed to the outside of the housing, wherein in the first state, the cover member seals the opening portion with a first length in the vertical direction, and, in the second state, the cover member covers the top of the sheet cassette with a second length that is greater than the first length in the insertion direction, characterized in that the cover member further includes: a first plate that extends in the vertical direction, and includes, on an upper end side thereof, a pivot portion serving as a pivot for the pivoting of the cover member in the first state, and; a second plate including a first energizing portion configured to be energized by the sheet cassette, extending along the first plate, and to being slidable relative to the first plate, and a first plate that extends in the vertical direction, and includes, on an upper end side thereof, a pivot portion serving as a pivot for the pivoting of the cover member in the first state, and; a second plate including a first energizing portion configured to be energized by the sheet cassette, extending along the first plate, and to being slidable relative to the first plate, and the sheet cassette configured to include an abutting portion having a first abutting surface capable of abutting the first energizing portion of the second plate, and the cover member configured to be pivoted about the pivot portion by the sheet cassette abutting the cover member, and the second plate configured to slid relative to the first plate and the cover member configured to be extended from the first length to the second length by the first abutting surface of the sheet cassette abutting the first energizing portion of the second plate.