3

I am able to upload images to mantis issues. I'd like to tweak the mantis code or config to auto-display images (gif, png, jpg).

Has anybody been successful in doing this?

Brian Webster
  • 30,033
  • 48
  • 152
  • 225

1 Answers1

4

The behaviour is controlled by the $g_preview_attachments_inline_max_size variable in config_inc.php

According to the Mantis manual:

This feature applies to bmp, jpg, gif, and png files that are attached to bugs. If the file size is smaller than the specified values, the actual image is also previewed with the bugs [...]

Although the manual says the default value is 0 (feature disabled), in Mantis 1.2.0 it is 256KBytes:

$g_preview_attachments_inline_max_size = 256 * 1024;
Archangel1C
  • 100
  • 11
Adrian
  • 6,013
  • 10
  • 47
  • 68
  • 2
    I thought it was obvious :) If you want to disable the behaviour you should edit the config_inc.php and set the $g_preview_attachments_inline_max_size to 0 However, if you want to enable inline preview for larger images, set the $g_preview_attachments_inline_max_size variable to the desired size (in bytes) e.g. for 512 Kbytes use 512*1024 – Adrian Oct 24 '09 at 19:39