Feature #3510
closedInserting image thumbnails inside the wiki
0%
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
Updated by Dario Dario about 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...
Updated by Davis Tan almost 15 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.
Updated by Davis Tan almost 15 years ago
I found a simple ruby script for doing similar:
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
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?
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
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
Updated by Jason Mitchell over 14 years ago
This seems like a duplicate of #949, which is still not fixed after being open for nearly 2 yrs...
Updated by jon hertzig almost 14 years ago
- File Redmine_-_Overview_-_Redmine_1283114957430.png Redmine_-_Overview_-_Redmine_1283114957430.png added
Here's a workaround: "!{width:200px}<image.png>!":<URL for attachment>
Updated by jon hertzig almost 14 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
Updated by Etienne Massip almost 13 years ago
- Status changed from New to Closed
- Resolution set to Duplicate
Closed as duplicate of #1006.
Updated by Kfir Lavi over 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
Updated by Jean-Philippe Lang about 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).