Feature #3510
closed
Inserting image thumbnails inside the wiki
Added by Dario Dario over 15 years ago.
Updated about 11 years ago.
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
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.
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
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
This seems like a duplicate of #949, which is still not fixed after being open for nearly 2 yrs...
Here's a workaround: "!{width:200px}<image.png>!":<URL for attachment>
Like this:
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
- Status changed from New to Closed
- Resolution set to Duplicate
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
- 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).
Also available in: Atom
PDF