version-controlbug-trackingmantis

Mantis: What do I change to auto-display attached images when viewing issues?


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?


Solution

  • 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;