Using the .url call in templates takes down the entire page

27 views
Skip to first unread message

Berk Birand

unread,
Jun 28, 2013, 1:46:15 PM6/28/13
to django-...@googlegroups.com
Hi all,

We are using imagekit on a production machine, and noticed some "-2 encoder" errors. Even if a single thumbnail on the entire page could not be generated, the entire page stopped working. As a result, we start using the fields without the ".url" attribute. This way, if the thumbnail wasn't present the picture looked empty, but at least all other artworks showed up.

The ".url" attribute is required for the image to be processed, right? If we use it without it, no file will be generated?

We are a bit anxious to put back the ".url" calls in, because the entire page went down. Do you think if there are any other errors (such as wrong permission of the CACHE directory or something), the entire page will go down again? I feel like if there is any error in the generation of the image, the URL should just appear empty, without throwing an error.

Any thoughts on this?

Thanks!

matthewwithanm

unread,
Jul 1, 2013, 8:06:58 PM7/1/13
to django-...@googlegroups.com
Hi Berk! Accessing the url attribute will cause the image to be generated when using the default configuration. (This can be changed however if you specify a different cachefile strategy.) If it raises an error (including because of incorrect permissions, etc) it'll cause a 500. It would be possible to catch the error and suppress it, but I'm not sure if it's a good idea or not.

Anybody else have any thoughts?
Reply all
Reply to author
Forward
0 new messages