0

I am using latest Ejabberd version 18.12.1. I have switched on mod_http_upload to upload the files with the default configuration for thumbnail as false. However when I try to turn it to true, the server fails to start and gives an error:

[error] <0.408.0>@gen_mod:module_error:574 Invalid value for option 'thumbnail' of module mod_http_upload: true

Based upon various documents and support material, I understand that we need to compile ejabberd with libgd option, to enable this feature. However I am not sure how to enable / compile with libgd. Which command do will do this.

I have installed all the required libraries including gd and gd-devel before compiling Ejabberd. I have also tried various options while compiling including --enable-graphics but that also didn't help.

Any help to understand how thumbnails can be enabled will be really appreciated.

Daniele Santi
  • 2,529
  • 1
  • 25
  • 22

2 Answers2

0

Looking at your question, I enabled that module with that option, and I also got that error message:

11:04:36.573 [warning] ejabberd is built without image converter support, option 'thumbnail' is ignored
11:04:36.573 [error] Invalid value for option 'thumbnail' of module mod_http_upload: true
11:04:36.573 [critical] ejabberd initialization was aborted because a module start failed.

Looking at the ejabberd source code, that requirement comes in fact from this erlang library: ejabberd/deps/eimp

Looking at eimp's README, I decided to install this package (I use Debian): libgd-dev, and it automatically installed others like libjpeg-dev, libpng-dev ...

Then I recompiled eimp:

cd ejabberd/deps/eimp
make clean
./configure
make

Last, I reinstalled ejabberd:

cd ejabberd/
make
make install

And now, finally, ejabberd can start correctly with thumbnail: true... no errors. I didn't test the feature in practice.

Badlop
  • 580
  • 3
  • 5
0

Thanks for the response Badlop and apologies for delay in getting back.

Actually I was trying this on Centos and even after resolving libgd dependency, it was giving issues with the eimp module you mentioned above. So finally I have switched to ubuntu and after installing ejabberd again with all the dependencies that error is gone.

I am able to start the server without any error with "thumbnail: true" and able to send files as well. However its still not generating thumbnail and there is no error in logs. Not sure what I am missing now.