On 09/13/2010 04:23 PM, [Ricardo Rodriguez] eBioTIC. wrote:
Marius Dumitru Florea wrote:
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?
As I said in a previous mail, resizing the image on the server is an
optimization that needs to be transparent for the user. Do you think the
user cares if the image is resized on the server or on the client if the
result is almost the same?
A developer that wants to display the original image in a light box or
in a different page can still use the $doc.getAttachmentURL to get the
URL to the original, full size, image.
Thanks,
Marius
> Thanks
> -Vincent
>
>
Just to confirm that this is a real use case here: images are displayed
in the page but at the same time are links to the original. We do need
to provide users with this link as we never know what area of a given
scientific picture could be of their interest. It will even better, on
click, to get a selector allowing to choose the resolution at with the
image want to be downloaded.
Sure, but you couldn't achieve this with only:
[[image:logo.jpg||width="150" height="100"]]
You need something more. Either a link around the image or a JavaScript
code that detects images and displays them in a light box when clicked.
In the first case you can use the attach:logo.jpg as the link reference
and in the second case the JavaScript code can remove the query string
of the image URL.
I understand that $doc.getAttachmentURL allows to get the original, but
for a regular user is much simpler to write {image:Figura_1.jpg|
|200|link=} *1* (XWiki1.0 still here).
We're talking about the XWiki 2.0 syntax here. There is a better
solution than $doc.getAttachmentURL:
[[[[image:logo.jpg||width="150"
height="100"]]>>attach:logo.jpg]]
Sorry if I've misunderstood the discussion!
No problem ;)
Thanks for the feedback,
Marius
Thanks.
Ricardo