The discussion revolves around HiDPI screenshots appearing too large by default in Discourse. dfabulich notes that HiDPI images, like those from a MacBook Pro, have a resolution of 144x144 and should be displayed at 50% by default. They suggest detecting this via PNG metadata, as shown by ImageMagick output. seanblue agrees, mentioning their 125% screen zoom causes similar issues. Stephen points out that iOS screenshots often lack resolution metadata, especially when saved via Photos, which is more common than saving to Files Stephen. dfabulich clarifies the difference between saving to Files (retains metadata) vs. Photos (loses it). dfabulich proposes heuristics, like detecting iPhone screen dimensions, but Stephen counters that cropping makes this unreliable. Most users manually adjust dimensions in markdown to fix the issue.
It certainly would be nice if this could be automatically detected. I have my computer zoomed to 125%, so my screenshots are always shown too large by default as well.
That depends on how you store the screenshot. If you save the screenshot to Files, it saves as PNG, and keeps its resolution information. If you save the screenshot to Photos and then upload from there, it loses its resolution information. (I think it’s saving the image as HEIF and then transcoding to PNG or something.)
Sure, and if our users are anything to go by the latter is the far more common of the two. Screenshots are only saved to files if you interrupting their capture and manually redirect them.
I think it would also be possible to use some heuristics to detect iPhone screenshots. (PNGs from an Apple device that are the exact dimensions of an iPhone screen…)