在附加至 PR 前,先在瀏覽器分頁中旋轉側向截圖
Rotate a sideways screenshot in the tab before you attach it to the PR
附加截圖至 PR、issue 或文件前,應先檢查方向,並在截圖確實側向或倒置時於本機旋轉,避免要求作者瞇眼查看或把截圖上傳至網上轉換器。旋轉時以 90° 為步進,保留資料夾預期的格式;若預覽工具未有遵從 EXIF 方向,應另行處理工具問題。
The bug is real, but the screenshot is on its side. A phone capture, a dropped EXIF orientation, or a desktop grab taken with the laptop in portrait lands in the PR as a sideways PNG. Reviewers tilt their heads, the docs preview crops the wrong edge, and someone says "please rotate and re-upload." A teammate then uploads it to a random converter "just this once."
I've started treating a sideways screenshot as an orientation mismatch, not as a reason to ask the author to "just squint." Rotate the asset if the image will be read in the issue, the PR, or the docs. Do not leave the raw capture if the contents are sideways on a normal display.
This is not a request to rotate every image. If the screenshot is already upright, leave it. The habit is to check orientation before you attach.
When a rotation is actually needed
Good fit:
- A phone screenshot that displays on its side in the PR or issue
- A capture whose EXIF orientation is ignored by the preview tool
- A docs or changelog image that was exported rotated 90° or 180°
Poor fit:
- Rotating a screenshot to hide layout that is actually broken in the product
- Re-encoding a lossless capture through a lossy export "while you are in there"
- Uploading a product screenshot to a hosted converter that keeps the file
If the preview tool should honor EXIF, that is a tooling change. Do not hide it inside a "please rotate" comment on every PR.
A simple orientation policy
- Check the image at 100% in a normal landscape window before you attach it
- Rotate in 90° steps when the capture is simply sideways or upside down
- Do not commit both the sideways original and the rotated file "just in case"
- Keep the format the folder already expects, usually PNG for UI screenshots
Paste this expectation into the prompt when the agent is attaching a capture. Ask it not to leave a sideways image in the review.
Rotate in the tab, then attach the upright file
You want a local rotation: open the image, turn it until the UI is upright, preview it, and download the result, including transparency when the source has it. No account, and no reason to send a product screenshot to a hosted converter.
When you are already in the browser, an in-tab rotator is enough. Image rotator turns the file in the tab, with a live preview, and lets you download a PNG without leaving the browser. Handy for one PR or issue image. If the team already has a CLI or a script for this, use that as the source of truth.
Caveats: a 90° or 180° fix is the usual case for a sideways capture. Arbitrary angles are rarely what a bug screenshot needs, and they can soften sharp UI edges. And if the preview already honors EXIF and the file looks upright on your machine, confirm it also looks upright in the PR preview, where EXIF is sometimes ignored.
If the agent already attached a sideways capture, the review question is not "can I tell what this is?" It is "will the next reviewer see this the right way up without tilting the display?"
Reject / send back
Reject
- A sideways or upside-down screenshot in a PR, issue, or docs folder
- Both the original and the rotated file committed for the same capture
- A hosted conversion of a screenshot that did not need to leave the machine
- A rotation used to crop away the actual bug
Accept
- An upright PNG that matches the folder contract, rotated locally
- A screenshot that was already upright and left alone
- A dedicated note or tooling PR if the preview should honor EXIF and currently does not
來源:DEV Community · dev.to