プロジェクト

全般

プロフィール

Vote #65379

完了

Inserting image thumbnails inside the wiki

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
開始日:
2009/06/18
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
47
issue_org_id:
3510
author_id:
6367
assigned_to_id:
1
comments:
15
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Hi, actually adding images inside the wiki with the !imageUrl! syntax is really easy. But what if I want to insert an image THUMBNAIL, instead? I suggest something like this:

!imageurl,w=800,h=300 !

Maybe we might even add support for "intelligent ratio" handling and squared thumbs:

!imageurl,w=250 ! -> this should create a thumbnail 250px wide and automatically calculate height (using the original ratio).
!imageurl,w=250,crop ! -> this should square/crop
!imageurl,w=250,round ! -> maybe rounded corners support? I'm over-requesting...

Obviously Rmagick should be enabled...

Hope this sounds useful, thanks in advance and keep up the great work

Dario


journals

I didn't notice the ! macro was hiding my suggestion ... Here's what I meant to say :)

> *! imageurl,w=800,h=300 !*
>
> Maybe we might even add support for "intelligent ratio" handling and squared thumbs:
>
> *! imageurl,w=250 !* -> this should create a thumbnail 250px wide and automatically calculate height (using the original ratio).
>
> *! imageurl,w=250,crop !* -> this should square/crop
> *! imageurl,w=250,round !* -> maybe rounded corners support? I'm over-requesting...
--------------------------------------------------------------------------------

I've have worked with thumbnails in php awhile ago. You can refer to one of my sites:
http://www.worthsave.com/product_thumb.php?img=images/gr.png&w=43&h=80

product_thumb.php will save a cache copy in the same folder of the picture.

We can have this implemented as a project setting for max height / width for thumbnails.

Will also need a wiki macro to handle the thumbnail version of the picture and optionally, click to zoom in to original size. Lightbox or similar js popups can be easily integrated.

Currently I'm using Redmine Wiki in our company's product documentation effort and looking forward to open it as a public site for our customers.

--------------------------------------------------------------------------------
I found a simple ruby script for doing similar:

"Resizing images using RMagick":http://snippets.dzone.com/posts/show/1173
--------------------------------------------------------------------------------
you can test my plugin http://github.com/lest/redmine_thumbnails

it requires installed ImageMagick and mini_magick gem

it adds macro
<pre>
{{thumb(attachment_name)}}
</pre>

you can specify width or height of thumbnail

<pre>
{{thumb(attachment_name, width=300)}}
{{thumb(attachment_name, height=300)}}
{{thumb(attachment_name, width=300, height=300)}}
</pre>

or set default values on plugin settings page
--------------------------------------------------------------------------------
Great! I will test this, thanks a lot. Hope your plugin gets implemented into the main trunk ;) does it work with file attached to the issue or even with files relative to other issues, wiki etc?
--------------------------------------------------------------------------------
Dario Dario wrote:
> Great! I will test this, thanks a lot. Hope your plugin gets implemented into the main trunk ;) does it work with file attached to the issue or even with files relative to other issues, wiki etc?

at this moment there is no documentation because i create it for my company internal use and only publish on github

soon i'll add some documentation and post link to it here
--------------------------------------------------------------------------------
some documentation to my plugin available on github http://github.com/lest/redmine_thumbnails/blob/master/README.rdoc
also you can post issues on github
--------------------------------------------------------------------------------
This seems like a duplicate of #949, which is still not fixed after being open for nearly 2 yrs...
--------------------------------------------------------------------------------
Here's a workaround: @"&#33;{width:200px}<image.png>!":<URL for attachment>@

--------------------------------------------------------------------------------
Like this:

" !{width:200px}Redmine_-_Overview_-_Redmine_1283114957430.png!":http://www.redmine.org/attachments/4394/Redmine_-_Overview_-_Redmine_1283114957430.png
--------------------------------------------------------------------------------
This only works if you comment (or remove) "self.filter_styles=true" in wiki_formatting\textile\formatter.rb

-- which lets you do lots of other wiki formatting as well, but apparently "can make Redmine vulnerable to XSS-attacks" see issue #949

--------------------------------------------------------------------------------
Closed as duplicate of #1006.
--------------------------------------------------------------------------------
Hi,
I'm running Gentoo with:
dev-ruby/rails-2.3.14
www-apps/redmine-1.3.0

I have installed https://github.com/lest/redmine_thumbnails
but it doesn't work.
It seems that the wiki doesn't recognize {{thumb()}} notation.
I tried also what jon hertzig said about "self.filter_styles=true" in wiki_formatting\textile\formatter.rb above.
Can someone explain how to use this?

Regards,
Kfir

--------------------------------------------------------------------------------
Different of #1006 actually and implemented in r10013.
A new @thumbnail@ macro lets you insert clickable thumbnails of attached images with the following syntax:

<pre>
{{thumbnail(image.png)}}
{{thumbnail(image.png, size=200)}}
{{thumbnail(image.png, size=200, title=Cool image)}}
</pre>

Imagemagick's `convert` binary needs to be installed so that thumbnails can be generated (RMagick gem is not required).
--------------------------------------------------------------------------------
!Redmine_-_Overview_-_Redmine_1283114957430.png!
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリText formatting_26 にセット
  • 対象バージョン2.1.0_47 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0