Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8544007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:26:54+00:00 2026-06-11T12:26:54+00:00

I use easy_thumbnails and it works fine on a development machine but in production

  • 0

I use easy_thumbnails and it works fine on a development machine but in production I get errors like shown below, when I use {% thumbnail photo.image 300x170 %} templatetag.

Though can directly browse http://sitename.com/media/uploads/2012/09/13/microsoft1.jpeg`.
Also media set correctly and uploads are being placed at the right place, what is missing then what might be wrong?

File "/home/imanhodjaev/lib/python2.7/django/template/base.py" in render
  823. bit = self.render_node(node, context)
File "/home/imanhodjaev/lib/python2.7/django/template/debug.py" in render_node
  74. return node.render(context)
File "/home/imanhodjaev/lib/python2.7/easy_thumbnails/templatetags/thumbnail.py" in render
  99. (source, e))
Exception Type: TemplateSyntaxError at /petition/microsoft-myi-hotim-kyirgyizskij-rasklad-klaviatur/update-picture
Exception Value: Couldn't get the thumbnail uploads/2012/09/13/microsoft1.jpeg: The source file does not appear to be an image

Model

ThumbnailerImageField from easy_thumbnails is used

class Petition(models.Model):
    title = models.CharField(max_length=512)
    slug = models.SlugField(max_length=512, editable=False, blank=True)
    description = models.TextField()
    petition_text = models.TextField(blank=True, null=True)
    petition_picture = ThumbnailerImageField(upload_to=get_upload_path, blank=True)

Update

I did investigation from Django’s management shell and get_thumbnailer function works fine

>>> thumb_url = get_thumbnailer(pet.petition_picture)
>>> thumb_url
<ThumbnailerImageFieldFile: uploads/2012/09/13/microsoft1.jpeg>
>>> thumb_url.url
'/m/uploads/2012/09/13/microsoft1.jpeg'

And when I call get thumbnail method it fails

>>> thumb_url = get_thumbnailer(pet.petition_picture).get_thumbnail(options)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/imanhodjaev/lib/python2.7/easy_thumbnails/files.py", line 380, in get_thumbnail
    thumbnail = self.generate_thumbnail(thumbnail_options)
  File "/home/imanhodjaev/lib/python2.7/easy_thumbnails/files.py", line 290, in generate_thumbnail
    "The source file does not appear to be an image")
InvalidImageFormatError: The source file does not appear to be an image
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:26:55+00:00Added an answer on June 11, 2026 at 12:26 pm

    The problem was because of by default pip install PIL on my Webfaction instance was linked with libjpeg so did pip install PIllow and followed the article at http://community.webfaction.com/questions/7340/how-to-install-pil-with-truetype-support

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use this thumbnail generator, but as you can see you have
UIImagePickerController is easy to use, but i'm all of a sudden finding it exasperating
I have installed psyco in one machine with no problem, but i'm getting an
How do i deal with this. I tryed: python manage.py migrate but i get
I am looking for a easy to use and easily changeable photo slider. I
It look desceptively easy to use System.Drawing to create thumbnails in your ASP.NET application.
any easy to use utility/tool/profiler/benchmark that able to test what is the maximum users
Is there some free and easy to use 3D library for iOS (and Android)
I really need an easy to use build tool which supports multiple languages with
Things to take into consideration: - easy to use - fast - use underlying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.