似乎无法获得sorl.thumnail来创建缩略图。它只是创建空文件。Django sorl.thumbnail问题
说,试着上传3.gif,原始文件被上传罚款,缩略图不创建,它会创建0字节的文件:
-rwxrwxrwx 1 www-data www-data 14128 2010-02-13 06:57 3.gif
-rwxrwxrwx 1 www-data www-data 0 2010-02-13 06:57 3_gif_200x200_autocrop_q85.jpg
模板看起来像这样
{% thumbnail photo.photo 200x200 autocrop as thumb %}
<img src="{{ thumb }}" width="{{ thumb.width }}" height="{{ thumb.height }}" alt="{{ photo.title }}" />
您的PIL安装是否具有所有相关的库?你的/ var/log/syslog(或等价物)说什么? –