Provide more flexible image scaling or styling

Support Ticket

+status
answered
 

On my wagn, there are some pages where I'd like to include images that are as large as they can comfortably be -- that is, the width should be scaled to the size of the content div, rather than be a static number like "small" or "medium" or "large" (or even "original", since the size of the content div might differ depending on the browser resolution).

 

The Image card here suggests putting styling directives directly in the inclusion tag, so I tried doing that (i.e., I put "width:100%;height:auto;" in the Image inclusion tag; but that doesn't help, because it puts the style attribute on the div that contains the image, rather than on the image tag itself.

 

It would be nice if there were a good way to add a style attribute to image tags in the rendered page. (For my immediate purpose, I'm just adding a new "fullwidth" view that can be used for Image cards; I have no idea if that's a good way of doing it in general.)

 

OK, I actually did this using CSS instead, and it works perfectly well. But it still seems like the sort of thing that ought to be more directly supported, maybe?

--Brett Neumeier.....2013-07-03 18:44:43 +0000

Something like fullwidth makes sense to me. One design question would be whether the image should be scaled up if it's narrower than the div's width - what do you think?

--John Abbe.....2013-07-04 08:11:41 +0000

right now "full" and "original" mean the same thing in terms of size. Perhaps we should change the meaning of full? We could do this quickly by loading the original image.

 

I generally don't like scaling up images, so we'd probably use max-width.

 

fwiw, I don't really like the idea of a separate view for this. You might want this size option in titled, content, open, etc.

--Ethan McCutchen.....2013-07-08 19:07:26 +0000

ticketed: support on-demand image sizing

--Ethan McCutchen.....2013-09-12 19:38:20 +0000