To handle overflow, Super User uses the following CSS for images:
img {
max-width: 640px;
}
For example, look at the following images with widths of 640px
and 800px
, respectively:
The second image is visually resized (by the browser using interpolation) to fit within the given bounds of 640px
.
This looks good, but it can be misleading. For one, it may not be obvious that the image is being visually resized. For all we know, the user uploaded a blurry 640px
wide image!
And if the image contains important, small details, copying the image's URL (or dragging the image to a new tab/window) to view it in full resolution, is not the most elegant solution.
So, I propose:
When embedding an image from the toolbar, automatically format it to be clickable.
[![image-alt][#]][#]
or...
- Attach a "Click to Enlarge" link to images larger than
640px
.
I am highly in favor of the first suggestion as it is non-intrusive and it would work great on mobile versions of the site, where images are visually resized to be even smaller.
PS:
Should we increase the image max-width
to match the post (.post-text
) width of 660px
?
Nevermind, 640px
is good:
right-click / View Image
in FF) would solve the problem. Browsers like IE don't even have a View Image option, so one needs to go to the image's Properties, copy the URL and then open it. All this unnecessary aggravation can be easily avoided with an auto-generated "click to enlarge" link, so what is the problem with implementing this?