Our goal should be to relinquish control of image sizing to the view, not build in more or different ways to specify it in the model.
Images should be given semantic classifications, and the skin should decide how to best display the image. Maybe it will be inline with the content, maybe it will be in a separate column which scrolls in sync with the content. Maybe it will be full width, floated right, a small thumbnail which when clicked expands to full screen. Maybe multiple images will be grouped together to make automatic galleries. Etc.
So, what we should be doing instead is deprecating the image size, type and style properties in exchange for a new semantic system where images are identified as primary, figure, aside, etc. (names are just examples). We can support both for a long time, and eventually drop support for the old properties. We could also interpret common sets of properties within certain thresholds as equivalent to semantic names, either on the fly or as a mass conversion change.
- Trevor
On Thu, Mar 27, 2014 at 9:39 AM, Gabriel Wicke gwicke@wikimedia.org wrote:
On 03/27/2014 08:32 AM, C. Scott Ananian wrote:
Currently mediawiki constrains image size primarily by width, which
doesn't
work so well for images which are taller than they are wide. There is no way to ask for an image which has a height equal to the "default
thumbnail
size" (without explicitly specifying a size in px)!
I support moving to square bounding boxes by default in the longer term, but am sceptical about the feasibility of doing this cleanly in the short term. A short-term solution based on adding more parameters that interact in subtle ways with other image parameters has a longer-term cost. We'll need to support those options for a long time, and I'm not sure that this cost is outweighed by the benefits.
For now Parsoid will use the existing upright option with the appropriate scaling factor. The main downside of this is that the image won't adhere to a square bounding box when the image aspect ratio changes. While not optimal, I believe that this case is rare enough that we don't need to rush on this.
Gabriel
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l