how to display attached images inline?

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
askmantis22
Posts: 4
Joined: 11 Aug 2022, 09:14

how to display attached images inline?

Post by askmantis22 »

hello, this is my first post here. I love MantisBT, we are using it for 8 years, only recently upgraded to 2.25.4

The problem is - when i add an image as attachment, it's thumbnail isn't displayed inline, looks like this: https://c2n.me/4gpi8LH.png
so it requires extra click and isn't convenient.

If it's relevant, we have following plugins installed:

MantisBT Formatting 2.25.4
BBCode+ 2.1.19

So the question is how to force mantisbt display attached images?

And second question, is it possible to attach multiple files/images at once? Currently it allows only 1.

Thank you!
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: how to display attached images inline?

Post by cas »

Check out this setting:
/**
* Specifies the maximum size (in bytes) below which an attachment is
* previewed in the bug view pages.
* To disable the previewing of attachments, set max size to 0.
* @global integer $g_preview_attachments_inline_max_size
*/
$g_preview_attachments_inline_max_size = 256 * 1024;

So you need to add to config/config_inc.php the line:
$g_preview_attachments_inline_max_size = 256 * 1024;

and of course adjust it to the value you think is appropriate for your installation
askmantis22
Posts: 4
Joined: 11 Aug 2022, 09:14

Re: how to display attached images inline?

Post by askmantis22 »

Thank you!

Do you need if its possible to attach multiple images at once?
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: how to display attached images inline?

Post by cas »

Normally all images that are with the correct specifications will be displayed.
Post Reply