On Sep 13, 2010, at 4:23 PM, Marius Dumitru Florea wrote:
On 09/13/2010 03:34 PM, Vincent Massol wrote:
BTW how do I render an image that I want to resize in the browser but without resizing it on the server?
You can't from the XWiki syntax. If the image has its width/height specified then it is resized on the server:
[[image:logo.jpg||width="150" height="100"]]
Why would you want to download a 1024x768 image when you view it at only 150x100? If you call:
getImageURL("Space.Page", "logo.jpg", {width:'150', height:'100'})
then you get a URL to a scaled version of logo.jpg image that has width 150 and height 100, which is IMO exactly what you are expecting.
For ex, if I want the image to be displayed in the page but I also want to be able to give a URL to the full size image?
Currently I don't see this as a real use case. What do you want to achieve with this? How is the user interacting with the image?
We do that all the time on xwiki.org. We display the image reduced but if the user clicks on it he sees the full size image.
Can you give me a link to such an example so that I can look at the code behind? http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing has plenty images but clicking on them does nothing.
I just realized that you can write:
[[[[image:logo.jpg||width="150px" height="100px"]]>>attach:logo.jpg]]
Yes. I thought for some reason that this wasn't working anymore. It is, my bad. BTW here's an issue to simplify this: http://jira.xwiki.org/jira/browse/XWIKI-4509 Thanks -Vincent
and you get a link to the original image. It's not nice but it works.
Thanks, Marius
-Vincent