Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
JIT Image Manipulation?
I’m sort of excited to use Symphony’s JIT Image Manipulation, and I’m wondering if there’s a way to get close with Textpattern.
After you upload an image, you can use a special HTML img src URL like this:
<img src="http://yoursite.com/image/1/200/0/images/ninja-parade.jpg"/>
…which would take the “ninja-parade.jpg” image and resize it (the ‘1’ argument) to 200px wide, keeping the correct aspect ratio (since height is set to 0 in the next argument).
So basically you can have an image resized, cropped, etc. right when you call it from your template (JIT being “Just In Time”), rather than manually creating thumbnails of all sorts.
I can see where this would make certain work a bit more idiot-proof. And hey, maybe even easier for clients to work with. And I’m wondering if it’s already been done in Textpattern. Or if it hasn’t, I’m wondering if there are similar solutions.
It just seems sort of Textpattern-y to me. :-)
Last edited by maruchan (2011-02-21 05:32:41)
Offline
Re: JIT Image Manipulation?
Upload it to your root folder and try something like this:
<txp:if_article_image >
<txp:images limit="1" break="">
<txp:permlink>
<img src="/slir/w100-c1:1/<txp:image_url/>" alt='<txp:image_info type="alt"/>' />
</txp:permlink>
</txp:images>
</txp:if_article_image>
Offline
Re: JIT Image Manipulation?
Holy crap.
I can’t wait to try that, thanks Mats!
Offline
Re: JIT Image Manipulation?
Original idea: Txp tips
Offline
Pages: 1