0

I'm trying to get django-wiki running. It works well so far, except I can't display .jpeg images.

At first I had trouble when only importing jpeg files in the webapp. I fixed this modifying setup.py of PIL's setup.py as follows:

JPEG_ROOT = libinclude("/usr/lib")

# Line 214
add_directory(library_dirs, "/usr/lib")
add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu") 

Jpeg libs I have currently installed:

libjpeg-progs
libjpeg62:amd64
libjpeg62-dev:amd64
libjpeg8:amd64
libopenjpeg2:amd64

After install PIL with pip install PIL, I get this output which doesn't look that bad, at least I thought so

*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
*** FREETYPE2 support not available
*** LITTLECMS support not available

No error messages (and no "decoder ntót available") and I can view the images properly on my server, which means upload works great. But in the wiki only the file names are shown and when I click on them I get

"This image failed to load."

Could someone please help me? I can't find any error output (debug mode is activated).

Thanks in advance

Exac
  • 113
  • 9

1 Answers1

0

You are compiling software! You need to install development libraries for these things to compile, e.g. apt-get install libjpeg-dev.

Also, install Pillow, it has less chances of failure to compile - pip install pillow.

benjaoming
  • 2,135
  • 1
  • 21
  • 29
  • @forethinker you can try looking if the required images are in fact in your filesystem and readable, furthermore that sorl.thumbnail is writing thumbnails in your media/cache folder.. if you can't find the thumbnails then something is wrong with sorl or Pillow in the thumbnail creation process. – benjaoming Apr 05 '15 at 21:36
  • Turns out the routing for django's static file was the problem for me. Here is [the solution that worked me](http://stackoverflow.com/questions/5517950/django-media-url-and-media-root) – Forethinker Apr 06 '15 at 23:40
  • 1
    @forethinker yes, but *media*, not *static* :) – benjaoming Apr 13 '15 at 21:55