Project

General

Profile

Actions

Defect #949

closed

Style not applied to wiki image

Added by Wes Billman almost 16 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
2008-03-28
Due date:
% Done:

0%

Estimated time:
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

Related to Redmine - Feature #2416: {background:color} doesn't work in text formattingClosedJean-Philippe Lang2008-12-30

Actions
Has duplicate Redmine - Feature #4453: Fully implement Textile Closed2009-12-20

Actions
Has duplicate Redmine - Defect #7395: Attached images don't resizeClosed2011-01-21

Actions
Actions #1

Updated by Rachel Majchrzak almost 16 years ago

+1

Actions #2

Updated by Chris Pitzer almost 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.

Actions #3

Updated by dop in almost 16 years ago

+1

Actions #4

Updated by Marcello Henrique over 15 years ago

+1

Actions #5

Updated by Jean-Philippe Lang over 15 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.

Actions #6

Updated by Anh Kỳ Huỳnh about 15 years ago

  • Status changed from Closed to Reopened

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

Actions #7

Updated by Alexey Lustin about 15 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

Actions #8

Updated by Martin Eckhardt about 15 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.

Actions #9

Updated by Jérémie Delaitre about 15 years ago

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

Actions #10

Updated by Nicklas Holm about 15 years ago

Not for me either...

Actions #11

Updated by Franc Marx almost 15 years ago

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

"!{width:300px}picture.jpg!"
Actions #12

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

Actions #13

Updated by Cyber Sprocket over 14 years ago

+1

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

Actions #14

Updated by Andrew Chaika over 14 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

Actions #15

Updated by Mischa The Evil over 14 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...

Actions #16

Updated by Michael Koch over 14 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?

Actions #17

Updated by Mischa The Evil over 14 years ago

  • Resolution deleted (Fixed)
Actions #18

Updated by Antti Kaijanmäki over 14 years ago

+1, anyone working on this?

Actions #19

Updated by Jean-Philippe Lang about 14 years ago

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

Updated by Tiago Alves about 14 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.

Actions #21

Updated by Enterux Solutions about 14 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.

Actions #22

Updated by Kamil . about 14 years ago

Maybe image should automatically fit to wiki page size?

Actions #23

Updated by Jason Mitchell almost 14 years ago

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

Actions #24

Updated by Rocco Stanzione over 13 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

Actions #25

Updated by jon hertzig over 13 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>

Actions #26

Updated by jon hertzig over 13 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>
Actions #27

Updated by James Rowe over 13 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.

Actions #28

Updated by Zbynek Drlik over 13 years ago

+1

Actions #29

Updated by egor sh over 13 years ago

+1

Actions #30

Updated by Ian DeFazio over 13 years ago

+1

Actions #31

Updated by Paul Heyer about 13 years ago

+1

Actions #33

Updated by Terence Mill about 13 years ago

+1

Actions #34

Updated by Lu Pon about 13 years ago

+1

Actions #35

Updated by Frederic Servant about 13 years ago

+1

Actions #36

Updated by thihy thihy about 13 years ago

+1

Actions #37

Updated by Josh Davidson about 13 years ago

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

Actions #38

Updated by Anonymous almost 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.

Actions #39

Updated by Dominic Clifton almost 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

Actions #40

Updated by Andrew Levshoff almost 13 years ago

+1

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

Actions #41

Updated by Terence Mill almost 13 years ago

+1

Actions #42

Updated by Roman Gaufman almost 13 years ago

+1

Actions #43

Updated by Cornell Wright over 12 years ago

+1

Is this ever going to be fixed??

Actions #44

Updated by Anonymous over 12 years ago

+1

Actions #45

Updated by Joe Kandaba over 12 years ago

+1 This should be one line of code right ?

Actions #46

Updated by Christian Köwing over 12 years ago

+1

Incredible that such a simple function is not yet implemented.

Actions #47

Updated by Not Needed over 12 years ago

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

Actions #48

Updated by Eric Voisard over 12 years ago

+1

Actions #49

Updated by Fabio Sousa over 12 years ago

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

Actions #50

Updated by Pavel Konstantinov over 12 years ago

+1. It should be easy.

Actions #51

Updated by rafael mello over 12 years ago

+1

Actions #52

Updated by Cassiano Monteiro over 12 years ago

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

Actions #53

Updated by Oli Kessler over 12 years ago

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

Actions #54

Updated by Axel Pospischil over 12 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 ;)

Actions #55

Updated by Etienne Massip over 12 years ago

  • Target version set to Candidate for next minor release
Actions #56

Updated by Etienne Massip over 12 years ago

  • Tracker changed from Feature to Defect
Actions #57

Updated by Etienne Massip over 12 years ago

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

Updated by Etienne Massip over 12 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.

Actions #59

Updated by Etienne Massip over 12 years ago

  • Target version deleted (Candidate for next minor release)
Actions #60

Updated by Etienne Massip about 12 years ago

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

Actions #61

Updated by Gary Ritchie about 12 years 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.

Actions #62

Updated by rm user over 11 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..

Actions #63

Updated by rm user over 11 years ago

  • Status changed from Closed to Reopened
Actions #64

Updated by Jean-Philippe Lang over 11 years ago

  • Status changed from Reopened to Closed

You can now use inline styles:

!{width:400px}http://i.imgur.com/Zb9j0.jpg!

Displays:

Actions #65

Updated by rm user over 11 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.

Actions #66

Updated by rm user over 11 years ago

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.

Actions #67

Updated by Jean-Philippe Lang over 11 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.

Actions #68

Updated by rm user over 11 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.

Actions #69

Updated by Chris Wilson over 11 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.

Actions #70

Updated by Alex Dergachev over 8 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

Actions #71

Updated by rm user over 8 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.

Actions

Also available in: Atom PDF