cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: Image treatment
Date Mon, 18 Jun 2007 15:21:53 GMT
lfhc pisze:
> Hi,
> what I'm trying to do is to transform this :
> 
> <xml ...
> 
> <image>http://sourceurl/path/image.jpg</image>
> 
> to
> 
> http://cocoonurl/image.jpg  where this image is resized.

You need something like this:
<map:match pattern="images/**"
   <map:read type="image-op-scale" src="cached:http://sourceurl/{1}?cocoon:cache-expires=60&cocoon:cache-name=cached-images"/>
</map:match>

This way you will get proxy-like behaviour thanks to Cocoon's cached: protocol thus avoiding
re-downloading original images again and again.

For description of cached source, take a look at: 
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/source/impl/CachingSource.html

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message