Mailing List Archive

Wiki / Images
Hi,

From the Trac Wiki page, I can read that:
"Urls ending with .png, .gif or .jpg will be converted to an IMG-tag."

However, it seems there is no provision in Trac to store or handle images.
What is the recommanded way to add images in Trac Wiki pages ?

Are these features (upload of images, image store & management, ...) already implemented in the
development branch ? If not, is this a planned feature ?

Thanks,
Manu.
Wiki / Images [ In reply to ]
Am 31.08.2004 um 20:27 schrieb Emmanuel Blot:
> From the Trac Wiki page, I can read that:
> "Urls ending with .png, .gif or .jpg will be converted to an IMG-tag."
>
> However, it seems there is no provision in Trac to store or handle
> images.
> What is the recommanded way to add images in Trac Wiki pages ?

You can add images as attachments to Wiki pages and tickets. This
feature exists since 0.7.

Cheers, Chris
--
Christopher Lenz
/=/ cmlenz at gmx.de
Wiki / Images [ In reply to ]
> You can add images as attachments to Wiki pages and tickets. This
> feature exists since 0.7.


I did not know that. Sorry.

What is the syntax to use in the Wiki to reference an attached file at a
given place ?

Thanks.
Wiki / Images [ In reply to ]
Christopher Lenz wrote:

> Am 31.08.2004 um 20:27 schrieb Emmanuel Blot:
>
>> From the Trac Wiki page, I can read that:
>> "Urls ending with .png, .gif or .jpg will be converted to an IMG-tag."
>>
>> However, it seems there is no provision in Trac to store or handle
>> images.
>> What is the recommanded way to add images in Trac Wiki pages ?
>
>
> You can add images as attachments to Wiki pages and tickets. This
> feature exists since 0.7.
>
I've just tried.
However, it does not work as (I) expected:

The image is attached as any other file to the Wiki page, and the page
cannot reference a self-contained image.

Ie, if I add "image.png" to WikiPage, and
WikiPage contains a reference to

http://host/trac/attachment/wiki/MediaOptiques/logo-dvdxrw.png

the image is not displayed in the Wiki-rendered page, the URL is kept
untouched (ie the URL is shown, not replaced with the actual image)

Did I miss something ?

Thanks,
Manu
Wiki / Images [ In reply to ]
Emmanuel Blot wrote:

> Christopher Lenz wrote:
>
>> Am 31.08.2004 um 20:27 schrieb Emmanuel Blot:
>>
>>> From the Trac Wiki page, I can read that:
>>> "Urls ending with .png, .gif or .jpg will be converted to an IMG-tag."
>>>
>>> However, it seems there is no provision in Trac to store or handle
>>> images.
>>> What is the recommanded way to add images in Trac Wiki pages ?
>>
>>
>>
>> You can add images as attachments to Wiki pages and tickets. This
>> feature exists since 0.7.
>>

> I've just tried.
> However, it does not work as (I) expected:
>
> The image is attached as any other file to the Wiki page, and the page
> cannot reference a self-contained image.
>
> Ie, if I add "image.png" to WikiPage, and
> WikiPage contains a reference to
>
> http://host/trac/attachment/wiki/MediaOptiques/logo-dvdxrw.png
>
> the image is not displayed in the Wiki-rendered page, the URL is kept
> untouched (ie the URL is shown, not replaced with the actual image)
>
> Did I miss something ?

The way i do it is:
- attach the file
- click on the attachment link
- Copy the url of the image location, is something ending ?format=raw
- Place this url in the wiki page and you are in business ;-)

Regards


--
--
********************************************************************
* *
* Bas van der Vlies e-mail: basv@sara.nl *
* SARA - Academic Computing Services phone: +31 20 592 8012 *
* Kruislaan 415 fax: +31 20 6683167 *
* 1098 SJ Amsterdam *
* *
********************************************************************
Wiki / Images [ In reply to ]
Bas van der Vlies <basv@sara.nl> [2004-09-01/11:10]:
> Emmanuel Blot wrote:
> > Christopher Lenz wrote:
> > > You can add images as attachments to Wiki pages and tickets. This
> > > feature exists since 0.7.
> > [...] Ie, if I add "image.png" to WikiPage, and WikiPage contains a
> > reference to
> > http://host/trac/attachment/wiki/MediaOptiques/logo-dvdxrw.png
> > the image is not displayed in the Wiki-rendered page, the URL is
> > kept untouched (ie the URL is shown, not replaced with the actual
> > image)
>
> The way i do it is:
> - attach the file
> - click on the attachment link
> - Copy the url of the image location, is something ending ?format=raw
> - Place this url in the wiki page and you are in business ;-)

Yes, it can be done. It would be nice though if there were an easy and
straightforward way to reference attached images by using some wiki
shorthand notation, like PageName/image1.png.

On a sidenote, I also miss the possibility to use relative paths to
images; things like images/xy.png or /images/xy.png are not recognised
as images, and there is no way (read: no syntax) to actually force an
image tag with whatever URL I want (think dynamically generated images,
with URL ending in .cgi/pl/py/whatever, or image formats not known to
Trac).

But I guess I should open a ticket instead of stating this here :)

Cheers,
Dan


--
. o . Daniel Roethlisberger <daniel@roe.ch> /pgp key\
. . o 144D 6A5E 0C88 E5D7 0775 FCFD 3974 0E98 804A 06B1
o o o Life would be much easier if I had the source code
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : /archive/trac/attachments/20040901/16c43277/attachment.pgp
Wiki / Images [ In reply to ]
Daniel Roethlisberger wrote:


>>
>>The way i do it is:
>>- attach the file
>>- click on the attachment link
>>- Copy the url of the image location, is something ending ?format=raw
>>- Place this url in the wiki page and you are in business ;-)
>
>
> Yes, it can be done. It would be nice though if there were an easy and
> straightforward way to reference attached images by using some wiki
> shorthand notation, like PageName/image1.png.
>

That would be a nice feature.

> On a sidenote, I also miss the possibility to use relative paths to
> images; things like images/xy.png or /images/xy.png are not recognised
> as images, and there is no way (read: no syntax) to actually force an
> image tag with whatever URL I want (think dynamically generated images,
> with URL ending in .cgi/pl/py/whatever, or image formats not known to
> Trac).
>
There is a way to solve this in wiki pages:
{{{
#!html
<center>
<img
src="/trac/beowulf/attachment/wiki/SaraCFengineConfig/bas.png?format=raw">
</center>
}}}



--
--
********************************************************************
* *
* Bas van der Vlies e-mail: basv@sara.nl *
* SARA - Academic Computing Services phone: +31 20 592 8012 *
* Kruislaan 415 fax: +31 20 6683167 *
* 1098 SJ Amsterdam *
* *
********************************************************************
Wiki / Images [ In reply to ]
Bas van der Vlies <basv@sara.nl> [2004-09-01/14:05]:
> Daniel Roethlisberger wrote:
> >On a sidenote, I also miss the possibility to use relative paths to
> >images; things like images/xy.png or /images/xy.png are not recognised
> >as images, and there is no way (read: no syntax) to actually force an
> >image tag with whatever URL I want (think dynamically generated images,
> >with URL ending in .cgi/pl/py/whatever, or image formats not known to
> >Trac).
> >
> There is a way to solve this in wiki pages:
> {{{
> #!html
> <center>
> <img
> src="/trac/beowulf/attachment/wiki/SaraCFengineConfig/bas.png?format=raw">
> </center>
> }}}

Absolutely correct. In my eyes a workaround at best -- not the point of
a wiki (low threshhold publishing and all that), having to fall back to
arcane wiki processor magic and HTML, is it? I don't expect the average
user to go to such lengths when he just wants to display say some
.bmp's. Easy things should be easy. Some friendly wiki syntax like
IMG:/foo/bar.bmp or [img]/foo/baz.png[/img] or some such would be much
nicer, I guess.

Cheers,
Dan


--
. o . Daniel Roethlisberger <daniel@roe.ch> /pgp key\
. . o 144D 6A5E 0C88 E5D7 0775 FCFD 3974 0E98 804A 06B1
o o o Life would be much easier if I had the source code
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : /archive/trac/attachments/20040901/51fa0692/attachment.pgp
Wiki / Images [ In reply to ]
Daniel Roethlisberger <daniel@roe.ch> [2004-09-01/12:56]:
> But I guess I should open a ticket instead of stating this here :)

Replying to myself now...

FYI: After double-checking for open tickets on this, I've created a new
ticket about enhancing the inline image handling:

http://projects.edgewall.com/trac/ticket/739

This should cover all that was discussed in this thread, but if I missed
something, feel free to add comments to the ticket.

Cheers,
Dan


--
. o . Daniel Roethlisberger <daniel@roe.ch> /pgp key\
. . o 144D 6A5E 0C88 E5D7 0775 FCFD 3974 0E98 804A 06B1
o o o Life would be much easier if I had the source code
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : /archive/trac/attachments/20040901/b0a4c653/attachment.pgp
Wiki / Images [ In reply to ]
>This should cover all that was discussed in this thread, but if I missed
>something, feel free to add comments to the ticket.
>
>
I agree on everything. Thanks for the bug submission.