fix(server): honour EXIF orientation and read the header from the open handle

A phone photo stored on its side carries an orientation tag that every
viewer applies, so the frame size alone would reserve a landscape box
for a portrait picture. The JPEG parser now swaps the axes for
orientations 5-8.

Media files read their header through the handle that already passed
the identity check instead of a second open, and only formats the
parser understands are read at all.

Co-Authored-By: Claude Code <noreply@anthropic.com>
c97ccee256Julius Marminge committed on 9/5/2026, 8:32:50 PMparentba55b8e
4 files changedLine totals unavailable