Project

General

Profile

Actions

Defect #949

closed

Style not applied to wiki image

Defect #949: Style not applied to wiki image

Added by Wes Billman over 18 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Resolution:
Wont fix
Affected version:

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

image_resize_classic_redmine_theme.diff (3.49 KB) image_resize_classic_redmine_theme.diff patch for auto-resizing and click on image to get full-size rm user, 2012-06-26 01:47

Related issues 3 (0 open — 3 closed)

Related to Redmine - Feature #2416: {background:color} doesn't work in text formattingClosedJean-Philippe LangActions
Has duplicate Redmine - Feature #4453: Fully implement Textile ClosedActions
Has duplicate Redmine - Defect #7395: Attached images don't resizeClosedActions

Updated by Rachel Majchrzak over 18 years ago Actions #1

+1

Updated by Chris Pitzer over 18 years ago Actions #2

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 dop in over 18 years ago Actions #3

+1

Updated by Marcello Henrique over 18 years ago Actions #4

+1

Updated by Jean-Philippe Lang over 18 years ago Actions #5

  • 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 18 years ago Actions #6

  • Status changed from Closed to Reopened

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

Updated by Alexey Lustin almost 18 years ago Actions #7

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 18 years ago Actions #8

+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 over 17 years ago Actions #9

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

Updated by Nicklas Holm over 17 years ago Actions #10

Not for me either...

Updated by Franc Marx over 17 years ago Actions #11

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

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

Updated by Andy Wiltshire over 17 years ago Actions #12

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 17 years ago Actions #13

+1

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

Updated by Andrew Chaika over 17 years ago Actions #14

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 17 years ago Actions #15

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 17 years ago Actions #16

+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 Mischa The Evil almost 17 years ago Actions #17

  • Resolution deleted (Fixed)

Updated by Antti Kaijanmäki almost 17 years ago Actions #18

+1, anyone working on this?

Updated by Jean-Philippe Lang almost 17 years ago Actions #19

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

Updated by Tiago Alves almost 17 years ago Actions #20

+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 over 16 years ago Actions #21

+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 . over 16 years ago Actions #22

Maybe image should automatically fit to wiki page size?

Updated by Jason Mitchell over 16 years ago Actions #23

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

Updated by Rocco Stanzione over 16 years ago Actions #24

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 about 16 years ago Actions #25

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 about 16 years ago Actions #26

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 about 16 years ago Actions #27

+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 Zbynek Drlik almost 16 years ago Actions #28

+1

Updated by egor sh almost 16 years ago Actions #29

+1

Updated by Ian DeFazio almost 16 years ago Actions #30

+1

Updated by Paul Heyer almost 16 years ago Actions #31

+1

Updated by Terence Mill almost 16 years ago Actions #33

+1

Updated by Lu Pon almost 16 years ago Actions #34

+1

Updated by Frederic Servant almost 16 years ago Actions #35

+1

Updated by thihy thihy almost 16 years ago Actions #36

+1

Updated by Josh Davidson over 15 years ago Actions #37

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

Updated by Anonymous over 15 years ago Actions #38

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 15 years ago Actions #39

+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 15 years ago Actions #40

+1

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

Updated by Terence Mill over 15 years ago Actions #41

+1

Updated by Roman Gaufman over 15 years ago Actions #42

+1

Updated by Cornell Wright over 15 years ago Actions #43

+1

Is this ever going to be fixed??

Updated by Anonymous over 15 years ago Actions #44

+1

Updated by Joe Kandaba over 15 years ago Actions #45

+1 This should be one line of code right ?

Updated by Christian Köwing over 15 years ago Actions #46

+1

Incredible that such a simple function is not yet implemented.

Updated by Not Needed over 15 years ago Actions #47

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

Updated by Eric Voisard over 15 years ago Actions #48

+1

Updated by Fabio Sousa over 15 years ago Actions #49

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

Updated by Pavel Konstantinov over 15 years ago Actions #50

+1. It should be easy.

Updated by rafael mello over 15 years ago Actions #51

+1

Updated by Cassiano Monteiro over 15 years ago Actions #52

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

Updated by Oli Kessler over 15 years ago Actions #53

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

Updated by Axel Pospischil about 15 years ago Actions #54

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 15 years ago Actions #55

  • Target version set to Candidate for next minor release

Updated by Etienne Massip about 15 years ago Actions #56

  • Tracker changed from Feature to Defect

Updated by Etienne Massip about 15 years ago Actions #57

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

Updated by Etienne Massip about 15 years ago Actions #58

  • 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 15 years ago Actions #59

  • Target version deleted (Candidate for next minor release)

Updated by Etienne Massip almost 15 years ago Actions #60

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

Updated by Gary Ritchie over 14 years ago Actions #61

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.

Updated by rm user over 14 years ago Actions #62

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 rm user over 14 years ago Actions #63

  • Status changed from Closed to Reopened

Updated by Jean-Philippe Lang over 14 years ago Actions #64

  • 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 14 years ago Actions #65

  • 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 14 years ago Actions #66

So, here is the patch for classic Redmine 1.3 theme (I'm not sure if it was changed in recent editions):

http://pastebin.com/YnneMifB

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 14 years ago Actions #67

  • 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 14 years ago Actions #68

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 about 14 years ago Actions #69

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 about 11 years ago Actions #70

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 about 11 years ago Actions #71

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.

Actions

Also available in: PDF Atom