the default image sizes don't suffice in some cases. although there are currently workarounds that involve browser resizing (described in example section), multiple wagneers have requested support for automatic server-side resizing.
inclusion syntax already accepts a "size" argument. In addition to the current named sizes (icon, small, medium, etc), we should also support explicit sizes using some variant of Image Magick resize args.
So to resize an image to 100px by 100px, you might do
{{myimage|size:100x100}}
currently, if you want to use browser resizing, you have to add something like this to your CSS:
.TYPE-image .content img { max-width: 100% }
and then do this in your inclusion syntax:
{{myimage | size:large; width:300px}}
The preferred solution is described in the solution section.
What if your design requires sizing by something other than pixels?
then you should use CSS / browser resizing. We can't store a different copy on the server for every tiny size variant that might be needed in relative sizing.
I'm confused. I was assuming this ticket was about dynamically sizing to the dimensions given. You're thinking to store versions that are 100x100 and a few other fixed dimensions?
if you need one that's 123x123, then we'd generate that one, store it, and provide it. there's no way you would want to resize images dynamically on the server with any frequency - just once per size.
My point was that if you want to specify the image in % or some other relative form, then that's the browser's job. maybe I'm not understanding the question?
No, that was the question, and I think having the CSS/browser size it makes sense. (CSS question: That would typically be by putting a width on the surrounding block-type tag, or ?)
Generally, the image resizing only happens when the css applies to the image tag itself. My preferred solution is to create a rule on img that sets max-width to 100%, which then makes it so that you can constrain the container (eg in inclusion syntax) and that will be inherited.
I'm actually going to be working on related docs soon. Will try to remember to link.
the example above actually documents this.