We know,
hiho=dido
hi=size of image
ho=size of object
di=distance of screen from pinhole
do=distance of object from pinhole
As the length of the pinhole camera (di) is increased, the distance of the screen from the pinhole increases.
So, the size of the image (hi) increases. Hence, when the length of the pinhole camera is increased, the size of the image increases.