Closed GoogleCodeExporter closed 8 years ago
I don't understand how this is an issue. You specify the height and width when
you size the image, so you know what to set the image width and height to.
Original comment by BinaryMoon
on 25 Sep 2011 at 9:36
Say you have a series of images that you need to fit in one dimension (all
600px wide) but the height can be variable. So you call TimThumb with the width
attribute, and they are all returned at that width, but at various heights. It
would be good to be able to know what that height is in advance so you can
apply those attributes to the <img> tag.
Height and width attributes are important for layout and also for DOM
manipulation with javascript. But since this is probably not a problem that
many people experience, I'll probably just build a function outside of TimThumb
to do it. Pär Thernström wrote a function previously for this but I found
that it sometimes reported the values incorrectly.
http://eskapism.se/blogg/2010/10/create-timthumb-img-tags-with-correct-with-and-
height-attributes-with-this-simple-function-for-wordpress/
Thanks,
Dalton
Original comment by dal...@madebyraygun.com
on 26 Sep 2011 at 2:42
I don't think this is something TimThumb can or should do. It generates images
and has no way to return values to a separate script.
Original comment by BinaryMoon
on 8 Oct 2011 at 7:55
Original issue reported on code.google.com by
dal...@madebyraygun.com
on 22 Sep 2011 at 7:16