roadrunnertwice: Dialogue: "I have caught many hapless creatures in my own inter-net." (Hapless creatures (Rainy Days))
Nick Eff ([personal profile] roadrunnertwice) wrote in [site community profile] dw_dev2019-11-27 05:21 pm

Help brainstorm ways to make images misbehave

A while back, I submitted a patch that sometimes shrinks images within post and comment bodies, to make sure they fit inside their container and fit on a single screen.

It seems to mostly be working, but there's also times when you don't WANT it to work; for example, it's perfectly fine for a long vertical comic strip to flow off the page.

So I'm messing with a way to let people click-to-zoom on individual images!

»» Here's the demo. ««

That demo has several different cases I thought about — for example, I'm not enabling click-to-zoom for images that are links, because links already do something when you click on them (and most of the time it's "go to the full size image" anyway). I'm also not zooming poll bar graph images, because those are special and weird.

Anyway, the trick with this is to make it do what people want most of the time, but hopefully never do anything really nonsensical. So I need help thinking of things that people do with images in their posts/comments that might cause nonsense, and then I can figure out which nonsense to mitigate and which nonsense to just accept. The only ones I came up with so far are:

  • If an image didn't need to shrink, it gets a "click to zoom" cursor on hover but it doesn't actually do anything.
  • If someone used the width="x" / height="x" attributes to make an image bigger than its natural size, the zoom cursor hints will be reversed (i.e. "zoom in" will actually shrink it).

What else have you got?