Defect #949

Style not applied to wiki image

Added by Wes Billman about 4 years ago. Updated 3 months ago.

Status:Closed Start date:2008-03-28
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Attachments
Target version:-
Affected version: Resolution:Wont fix

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.


Related issues

related to Feature #2416: {background:color} doesn't work in text formatting Closed 2008-12-30
duplicated by Defect #7395: Attached images don't resize Closed 2011-01-21
duplicated by Feature #4453: Fully implement Textile Closed 2009-12-20

History

#1 Updated by Rachel Majchrzak about 4 years ago

+1

#2 Updated by Chris Pitzer about 4 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.

#3 Updated by dop in almost 4 years ago

+1

#4 Updated by Marcello Henrique almost 4 years ago

+1

#5 Updated by Jean-Philippe Lang almost 4 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.

#6 Updated by Anh Kỳ Huỳnh over 3 years ago

  • Status changed from Closed to Reopened

My site is using Redmine 080. The parameter {width:...} doesnot work anymore.

#7 Updated by Alexey Lustin over 3 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

#8 Updated by Martin Eckhardt over 3 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.

#9 Updated by Jérémie Delaitre about 3 years ago

I'm using redmine trunk and it does not work too...

#10 Updated by Nicklas Holm about 3 years ago

Not for me either...

#11 Updated by Franc Marx almost 3 years ago

after update to Redmine 0.8.0 picture resize doesn't mork anymore

"!{width:300px}picture.jpg!"

#12 Updated by Andy Wiltshire almost 3 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.

#13 Updated by Cyber Sprocket almost 3 years ago

+1

!{width:300px}image.png! does not work on latest production release Redmine 0.8.4.stable.2769 (MySQL)

#14 Updated by Andrew Chaika almost 3 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:

1self.filter_styles=true

#15 Updated by Mischa The Evil almost 3 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...

#16 Updated by Michael Koch over 2 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?

#17 Updated by Mischa The Evil over 2 years ago

  • Resolution deleted (Fixed)

#18 Updated by Antti Kaijanmäki over 2 years ago

+1, anyone working on this?

#19 Updated by Jean-Philippe Lang over 2 years ago

  • Subject changed from Wiki Image Resizing to Resizing attached image
  • Category changed from Wiki to Attachments

#20 Updated by Tiago Alves over 2 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.

#21 Updated by Enterux Solutions about 2 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.

#22 Updated by Kamil . about 2 years ago

Maybe image should automatically fit to wiki page size?

#23 Updated by Jason Mitchell about 2 years ago

+1
Extremely annoying. Any hope of correcting this or is the intent to use the plugin described in #3510?

#24 Updated by Rocco Stanzione almost 2 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

#25 Updated by jon hertzig over 1 year 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>

#26 Updated by jon hertzig over 1 year 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>

#27 Updated by James Rowe over 1 year 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.

#28 Updated by Zbynek Drlik over 1 year ago

+1

#29 Updated by egor sh over 1 year ago

+1

#30 Updated by Ian DeFazio over 1 year ago

+1

#31 Updated by Paul Heyer over 1 year ago

+1

#33 Updated by Terence Mill over 1 year ago

+1

#34 Updated by Lu Pa over 1 year ago

+1

#35 Updated by Frederic Servant over 1 year ago

+1

#36 Updated by thihy thihy over 1 year ago

+1

#37 Updated by Josh Davidson over 1 year ago

Can't believe this obvious issue is three years old...+1

#38 Updated by Patrice Bonhomme about 1 year 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.

#39 Updated by Dominic Clifton about 1 year 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

#40 Updated by Andrew Levshoff about 1 year ago

+1

This is a "must have" feature for wiki syntax.

#41 Updated by Terence Mill about 1 year ago

+1

#42 Updated by Roman Gaufman about 1 year ago

+1

#43 Updated by Cornell Wright 10 months ago

+1

Is this ever going to be fixed??

#44 Updated by Andy Dufilie 10 months ago

+1

#45 Updated by Joe Kandaba 10 months ago

+1 This should be one line of code right ?

#46 Updated by Christian Köwing 10 months ago

+1

Incredible that such a simple function is not yet implemented.

#47 Updated by Not Needed 10 months ago

+1, common guys, such a great tool missing a basic feature like this is just wrong.

#48 Updated by Eric Voisard 10 months ago

+1

#49 Updated by Fabio Sousa 10 months ago

worrying! With all due respect, but makes us think about the future of the project

#50 Updated by Pavel Konstantinov 10 months ago

+1. It should be easy.

#51 Updated by rafael mello 10 months ago

+1

#52 Updated by Cassiano Monteiro 10 months ago

+1!
I´m impressed it´s not even on the roadmap...

#53 Updated by Oli Kessler 9 months ago

+1
The CSS fix is perfect, in the meantime..

#54 Updated by Axel Pospischil 8 months 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 ;)

#55 Updated by Etienne Massip 8 months ago

  • Target version set to Candidate for next minor release

#56 Updated by Etienne Massip 8 months ago

  • Tracker changed from Feature to Defect

#57 Updated by Etienne Massip 8 months ago

  • Subject changed from Resizing attached image to Style not applied to wiki image

#58 Updated by Etienne Massip 7 months 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.

#59 Updated by Etienne Massip 7 months ago

  • Target version deleted (Candidate for next minor release)

#60 Updated by Etienne Massip 3 months ago

BTW, width and height styles are allowed again, see #2416.

#61 Updated by Gary Ritchie 3 months ago

Etienne Massip wrote:

BTW, width and height styles are allowed again, see #2416.

Not working for images. Appears to be only for text formatting in r8860.

Also available in: Atom PDF