You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Git LFS images in pull request diffs show as pointer text #41558
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Open a pull request or GitLab merge request whose Code tab includes a PNG, JPEG, GIF, or WebP tracked by Git LFS.
Expand that file in the Code tab (web or desktop).
Expected behavior
The expanded row shows the image at that revision, the same way a normal PNG with no patch already does.
Actual behavior
The row is a three-line text hunk:
version https://git-lfs.github.com/spec/v1
oid sha256:…
size …
PullRequestCodeTab only builds an image preview when fileDiff.hunks.length === 0 and the provider implements rawFileUrl (apps/web/src/components/pullRequest/PullRequestCodeTab.tsx, imagePreviewUrl). An LFS-tracked image is stored as that pointer, so the host sends a text patch and the preview path never runs. GitLab has no rawFileUrl at all.
The working counterpart is the same Code tab for a non-LFS image with no patch, which already renders the file at the revision. GitHub pull request descriptions already load the LFS object instead of the pointer; the Code tab still shows the pointer.
Web and desktop. Reproduced conceptually on GitHub.com and self-hosted GitLab (LFS-tracked artwork in the MR). Same Code tab path on both; GitLab never takes the image-preview branch.
Logs or stack traces
None needed. The pointer text is the file content the diff already has.
Workaround
Open the file on the host website, or check it out locally outside T3 Code.
Activity
fix(mobile): Git LFS images in pull request changes open the picture