Project

General

Profile

Actions

Feature #3510

closed

Inserting image thumbnails inside the wiki

Added by Dario Dario almost 15 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Text formatting
Target version:
Start date:
2009-06-18
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

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

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

-> this should create a thumbnail 250px wide and automatically calculate height (using the original ratio).
-> this should square/crop
-> 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


Files

Actions #1

Updated by Dario Dario almost 15 years ago

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...

Actions #2

Updated by Davis Tan over 14 years ago

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.

Actions #3

Updated by Davis Tan over 14 years ago

I found a simple ruby script for doing similar:

Resizing images using RMagick

Actions #4

Updated by Just Lest over 14 years ago

you can test my plugin http://github.com/lest/redmine_thumbnails

it requires installed ImageMagick and mini_magick gem

it adds macro

{{thumb(attachment_name)}}

you can specify width or height of thumbnail

{{thumb(attachment_name, width=300)}}
{{thumb(attachment_name, height=300)}}
{{thumb(attachment_name, width=300, height=300)}}

or set default values on plugin settings page

Actions #5

Updated by Dario Dario over 14 years ago

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?

Actions #6

Updated by Just Lest over 14 years ago

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

Actions #7

Updated by Just Lest over 14 years ago

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

Actions #8

Updated by Jason Mitchell about 14 years ago

This seems like a duplicate of #949, which is still not fixed after being open for nearly 2 yrs...

Actions #9

Updated by jon hertzig over 13 years ago

Here's a workaround: "!{width:200px}<image.png>!":<URL for attachment>

Actions #10

Updated by jon hertzig over 13 years ago

Like this:

Actions #11

Updated by jon hertzig over 13 years ago

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

Actions #12

Updated by Etienne Massip over 12 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Closed as duplicate of #1006.

Actions #13

Updated by Kfir Lavi about 12 years ago

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

Actions #14

Updated by Jean-Philippe Lang almost 12 years ago

  • Category changed from Wiki to Text formatting
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.1.0
  • Resolution changed from Duplicate to Fixed

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

{{thumbnail(image.png)}}
{{thumbnail(image.png, size=200)}}
{{thumbnail(image.png, size=200, title=Cool image)}}

Imagemagick's `convert` binary needs to be installed so that thumbnails can be generated (RMagick gem is not required).

Actions #15

Updated by hari gowtham over 10 years ago

Actions

Also available in: Atom PDF