Last modified: 2011-11-29 21:59:35 UTC
Hello, I've written a patch that enables em and ex image sizes to be used in a wiki, if and only if '$wgAllowEmExImageSizes = true' is set in LocalSettings.php. As more and more people are interested in putting wikibooks and wiki pages into print and pdfs, it is very helpful to have images with sizes set by the client relative to the font size. The downside is that clients will sometimes download large images that are print ready; nonetheless, at the Blender wiki, we believe this functionality will make it much easier for us to get our documentation to print quickly. I hope you like the patch
Created attachment 2243 [details] Patch to allow image em and ex sizes in wiki pages
*** Bug 8429 has been marked as a duplicate of this bug. ***
The essential problem here is that we don't use client-side resizing. Because it's horrible. We use server-side resizing, and the server has no idea what an em is in the context that the image is used.
Note that the use of em or ex sizes is not really related to provision of higher-resolution printer-friendly images. A "pixel" in CSS/HTML doesn't actually refer to a literal pixel on the output device, but is a logical unit. (Though it generally does correspond to a pixel for on-screen rendering today). I'm closing this as WONTFIX since em/ex sizes really just don't fit well with what makes sense for web-friendly rendering unless you move to an all-vector or who-cares-about-bandwidth world.
*** Bug 9409 has been marked as a duplicate of this bug. ***
Changing to LATER: we may want to reconsider at some point if either clients reliably support good image scaling, or if we start serving actual vector images instead of rasterized versions.
"...we don't use client-side resizing..." Not quite true; GIF thumb generation has been turned off recently. But I hope that gets re-enables real soon.
Modern browsers are much better at client-side scaling, and we may well end up shipping more SVG and intermediately-sized images in the future. But, em and ex aren't really as needed as they used to be. Modern browsers' zoom capability zooms images and other elements as well as text; '100px' is actually a logical size that's more consistently portable to use than '6em' or something. I'm going ahead and resolving as WONTFIX.