Defect #949
closedStyle not applied to wiki image
0%
Description
Wiki images should resize.
Often I add large screen shots to wiki pages and it would be great to be able to specify a size (either globally or per image) of a thumbnail. So that inline wiki images would not fill the full wiki page.
Forgive me if this is a duplicate, I did a quick search but didn't find anything.
Files
Related issues
Updated by Chris Pitzer over 16 years ago
Agreed. Something like...
!image.png!
...displays a normal image, and...
!size(width,300,image.png)!
...displays an image at 300px width. And by default clicking a resized image should link to the full sized image. (the resize could just be the normal image with width="300" on the html tag, or it could be resized server side... but the syntax remains the same.)
As I put all my design notes up on the wiki, having thumbnail capacity would be really really helpful for me. Waiting for a half dozen images to load all the time sucks.
Updated by Jean-Philippe Lang over 16 years ago
- Status changed from New to Closed
- Resolution set to Fixed
The syntax is:
!{width:300px}image.png!
I'll add it to the doc.
Updated by Anh Kỳ Huỳnh almost 16 years ago
- Status changed from Closed to Reopened
My site is using Redmine 080. The parameter {width:...}
doesnot work anymore.
Updated by Alexey Lustin almost 16 years ago
Kỳ Anh Huỳnh wrote:
My site is using Redmine 080. The parameter
{width:...}
doesnot work anymore.
+1
in my testing portal work on Redmine trunk version width does't work too
i have tried to set the width of atached image and to image with url - same result - does't render
Updated by Martin Eckhardt almost 16 years ago
+1
Same at my company. A user tried to resize an image without success. We tried both url + attachment. Its rather annoying to resize it by hand.
Updated by Jérémie Delaitre almost 16 years ago
I'm using redmine trunk and it does not work too...
Updated by Franc Marx over 15 years ago
after update to Redmine 0.8.0 picture resize doesn't mork anymore
"!{width:300px}picture.jpg!"
Updated by Andy Wiltshire over 15 years ago
Franc Marx wrote:
after update to Redmine 0.8.0 picture resize doesn't mork anymore
[...]
Agreed. We really need to be able to resize images. How hard is it to integrate some sort of autothumbnail or resizer? Formatting of posts/messages is lacking a bit for what we want to do.
Updated by Cyber Sprocket over 15 years ago
+1
!{width:300px}image.png!
does not work on latest production release Redmine 0.8.4.stable.2769 (MySQL)
Updated by Andrew Chaika over 15 years ago
Franc Marx wrote:
after update to Redmine 0.8.0 picture resize doesn't mork anymore
Just comment (or remove) in wiki_formatting\textile\formatter.rb line:
self.filter_styles=true
Updated by Mischa The Evil over 15 years ago
Andrew Chaika wrote:
Franc Marx wrote:
after update to Redmine 0.8.0 picture resize doesn't mork anymore
Just comment (or remove) in wiki_formatting\textile\formatter.rb line:
[...]
Be aware that this "hack" can make Redmine vulnerable to XSS-attacks. See #2416 for the whole story.
HTH...
Updated by Michael Koch about 15 years ago
+1 on adding the ability to resize images. we have had a lot of people complain about this. will it be fixed? ever? or is the security issue to relevant?
Updated by Jean-Philippe Lang about 15 years ago
- Subject changed from Wiki Image Resizing to Resizing attached image
- Category changed from Wiki to Attachments
Updated by Tiago Alves almost 15 years ago
+1
While this isn't solved I added this CSS snippet to our theme's application.css
stylesheet:
#content .wiki img { max-width: 98%; }
This resizes images that are larger than the wiki page itself.
Updated by Enterux Solutions almost 15 years ago
+1
Any updates to this issue. I've redmine 0.9.2 Setup. Does every thing i want. Needs this feature to make wiki pages look good. Should be like we get to see the full size image when clicked on the resized image.
Updated by Kamil . almost 15 years ago
Maybe image should automatically fit to wiki page size?
Updated by Jason Mitchell almost 15 years ago
+1
Extremely annoying. Any hope of correcting this or is the intent to use the plugin described in #3510?
Updated by Rocco Stanzione over 14 years ago
The behavior appears (from code and comments) to be a security feature intended to help protect public sites. You can change it back to the old behavior by commenting out this line:self.filter_styles=true
in the initialize
method of Redmine::WikiFormatting::Textile::Formatter
in lib/redmine/wiki_formatting/textile/formatter.rb
Updated by jon hertzig over 14 years ago
If you're willing to change the "self.filter_styles=true" line in wiki_formatting\textile\formatter.rb (and allow the XSS vulnerability), you can dummy a thumbnail by " ":<URL for attachment>
Updated by jon hertzig over 14 years ago
jon hertzig wrote:
If you're willing to change the "self.filter_styles=true" line in wiki_formatting\textile\formatter.rb (and allow the XSS vulnerability), you can dummy a thumbnail by " ":<URL for attachment>
(should be:)
" !{width:200px}<image.png>!":<URL for attachment>
Updated by James Rowe over 14 years ago
+1
is there a suggested donation to commence work on this feature?
This is a huge annoyance for us. We don't want to lose resolution on screen captures, but want to include them in the wiki.
Request tracker (other system that we plan on moving away from) will take the attached image and fit it nicely within the comment; a la maxwidth:98% kind of css.
Updated by Josh Davidson almost 14 years ago
Can't believe this obvious issue is three years old...+1
Updated by Anonymous over 13 years ago
Thanks, it works very well.
Patrice
Tiago Alves wrote:
+1
While this isn't solved I added this CSS snippet to our theme's
application.css
stylesheet:
[...]This resizes images that are larger than the wiki page itself.
Updated by Dominic Clifton over 13 years ago
+1
Can a Redmine maintainer please schedule this for inclusion in an upcoming or future release so that we all know when to look out for this much-requested feature.
We're currently using Redmine 1.1.2.stable.5026
Updated by Andrew Levshoff over 13 years ago
+1
This is a "must have" feature for wiki syntax.
Updated by Cornell Wright over 13 years ago
+1
Is this ever going to be fixed??
Updated by Joe Kandaba over 13 years ago
+1 This should be one line of code right ?
Updated by Christian Köwing over 13 years ago
+1
Incredible that such a simple function is not yet implemented.
Updated by Not Needed over 13 years ago
+1, common guys, such a great tool missing a basic feature like this is just wrong.
Updated by Fabio Sousa over 13 years ago
worrying! With all due respect, but makes us think about the future of the project
Updated by Cassiano Monteiro over 13 years ago
+1!
I´m impressed it´s not even on the roadmap...
Updated by Oli Kessler over 13 years ago
+1
The CSS fix is perfect, in the meantime..
Updated by Axel Pospischil about 13 years ago
Oli Kessler wrote:
+1
The CSS fix is perfect, in the meantime..
dito
Hi there, any news about this?
Really like to impress my managers using this tool, but presenting my class diagrams this way ... ;(
Took me over an hour to find out, that it is not my fault ;)
Updated by Etienne Massip about 13 years ago
- Target version set to Candidate for next minor release
Updated by Etienne Massip about 13 years ago
- Tracker changed from Feature to Defect
Updated by Etienne Massip about 13 years ago
- Subject changed from Resizing attached image to Style not applied to wiki image
Updated by Etienne Massip about 13 years ago
- Status changed from Reopened to Closed
- Resolution set to Wont fix
Rocco Stanzione wrote:
The behavior appears (from code and comments) to be a security feature intended to help protect public sites.
Indeed, it appears with r2192 which fixed security issue #2377 together with r2170, concerning possibility to inject JS in page code.
I close this one sine it's not a defect in favor of #1006.
Updated by Etienne Massip about 13 years ago
- Target version deleted (
Candidate for next minor release)
Updated by Etienne Massip almost 13 years ago
BTW, width and height styles are allowed again, see #2416.
Updated by Gary Ritchie almost 13 years ago
Updated by rm user over 12 years ago
lol, 4 years and closed without a fix!!
what a shame...
I've used http://www.redmine.org/plugins/redmine_lightbox very nice plugin for attachments on the issues, but it doesn't work for images posted in the redmine..
Any idea how to make a plugin which will parse ALL images pasted into redmine and make them work as the lightbox plugin? (i.e. images posted in one comment to work like lightbox on attachments).
simple testcase:
as you can see it kills the page completely! really need a solution urgently..
Updated by Jean-Philippe Lang over 12 years ago
- Status changed from Reopened to Closed
You can now use inline styles:
!{width:400px}http://i.imgur.com/Zb9j0.jpg!
Displays:
Updated by rm user over 12 years ago
- Status changed from Closed to Reopened
Sorry, but it's really not comfort at all :( How can I get full-size picture? I need to add additional link etc.. Whilst I just want to add an image and click on it to get it full-size.
I'd strongly suggest auto-resizing images automatically via JavaScript.
So when you click on the image you get it in the full-size in a window while other elements on the pages are hidden. After clicking again you get back.
I have very low skill in JS and I don't know what actually redmine uses in terms of JS, but I just did some JS hacking in my theme to get it working exactly like that!
I will share my work bit later when cleanup it a bit. Really need this to be integrated into the redmine.
Also displaying attachments as thumbnails with lightbox would be a very good feature and would bring redmine to the next level of SCM.
Updated by rm user over 12 years ago
So, here is the patch for classic Redmine 1.3 theme (I'm not sure if it was changed in recent editions):
For default redmine theme the algorythm of patching is the same
JS code goes into javascripts/theme.js and CSS code into stylesheets/application.css.
It's a bit hacky solution because it replaces all <img> tags without onclick action defined and resizes all wiki images automatically to 500px, on click you get a full-size image.
I'm not an expert of JavaScript or Ruby so can't really say how to apply this onclick event to only wiki/issue images.
Also attached it in case pastebin fails.
Updated by Jean-Philippe Lang over 12 years ago
- Status changed from Reopened to Closed
Please don't reopen this issue that was about being able to apply inline styles.
Have a look at #1006 instead.
Updated by rm user over 12 years ago
Jean-Philippe Lang wrote:
Please don't reopen this issue that was about being able to apply inline styles.
Have a look at #1006 instead.
I understand what you're saying, but it's a bit different issue, because it's about attachment whilst this issue is about images posted into any message body (i.e. in forums/wiki/issues).
Anyways I see nobody seems to care about this much, so I just resolved this with dirty workaround.
Updated by Chris Wilson over 12 years ago
I don't want thumbnails, which is what #1006 is about.
I want sensibly sized images, with borders, in my pages. I want to be able to apply arbitrary styles to images, as supported by Textile.
This is on a private site, so I don't care about XSS. I would at least like an option to disable the filtering, so that we have the full power of Textile.
Please, please reopen this issue.
Updated by Alex Dergachev over 9 years ago
For anyone who stumbles across this old issue, if you want "sensibly sized images, with borders", with clicking to see full-size, check out this mini plugin we've been using for years. https://github.com/evolvingweb/redmine_thumbnail_embed
Updated by rm user over 9 years ago
Alex Dergachev wrote:
For anyone who stumbles across this old issue, if you want "sensibly sized images, with borders", with clicking to see full-size, check out this mini plugin we've been using for years. https://github.com/evolvingweb/redmine_thumbnail_embed
as far as i understood it's just a plugin to make thumbnails of images via special tag
{{thumbnail}}or so
so it means i need to edit all previously linked images to display them properly on pages.
instead just apply my solution (patch redmine's theme) so on any page images will be automatically resized and give you full size image if you click on the image.