The shape of jets produced in quasi-real photon-proton collisions at c
entre-of-mass energies in the range 134-277 GeV has been measured usin
g the hadronic energy flow. The measurement was done with the ZEUS det
ector at HERA. Jets are identified using a cone algorithm in the eta -
phi plane with a cone radius of one unit. Measured jet shapes both in
inclusive jet and dijet production with transverse energies E-T(jet)
> 14 GeV are presented. The jet shape broadens as the jet pseudorapidi
ty (eta(jet)) increases and narrows as E-T(jet) increases. In dijet ph
otoproduction, the jet shapes have been measured separately for sample
s dominated by resolved and by direct processes, Leading-logarithm par
ton-shower Monte Carlo calculations of resolved and direct processes d
escribe well the measured jet shapes except for the inclusive producti
on of jets with high eta(jet) and low E-T(jet). The observed broadenin
g of the jet shape as eta(jet) increases is consistent with the predic
ted increase in the fraction of final state gluon jets.