Questions tagged [django-imagekit]

Automated image processing for Django models.

ImageKit is a Django app that helps you to add variations of uploaded images to your models. These variations are called “specs” and can include things like different sizes (e.g. thumbnails) and black and white versions.

Documentation is available at https://django-imagekit.readthedocs.io/

140 questions
1
vote
2 answers

django-imagekit minimal setup not working

I want to upload image with width 400px and get two other images - 200px and 100px. I googled and django-imagekit looks like it can do this. So I added imagekit to INSTALLED_APPS and added this to my model: from imagekit.models import…
Lucas03
  • 2,267
  • 2
  • 32
  • 60
1
vote
1 answer

Image management on Django

I'm trying to figure out which image management library to use on django. What is the difference between photologue, image-kit, and pil(python imaging library)?
prostock
  • 9,327
  • 19
  • 70
  • 118
1
vote
2 answers

ImageKit in Django

I am implementing ImageKit in a Django app and I have everything set up properly to my knowledge. When I run the command $python manage.py ikflush main the command seems to run fine but nothing appears to happen. None of the images get resized or…
thomallen
  • 1,926
  • 1
  • 18
  • 32
1
vote
1 answer

django imagekit - list view and details view image

I have just started using django imagekit. I have a list view page where the images are of dimensions 270 x 203 (30 KB approx.) and same images have a size of 570 x 427 (90 KB approx.) in the details view page. I wanted to know; Should have create…
Uma
  • 689
  • 2
  • 12
  • 35
1
vote
1 answer

How do I test a Django model with ImageSpecField?

I got a following model: class Room(models.Model): order = models.SmallIntegerField() name = models.CharField(max_length=20) background = models.ImageField(upload_to='room_background', blank=False, null=False) background_preview =…
Vadim Tikanov
  • 631
  • 1
  • 9
  • 26
1
vote
1 answer

Django, two ImageField pointing to the same file

I'd like my two image fields point to the same image. At one time, I'll have one image field populated. At later time, I'd like another imageField to point to the same file. (If the first one changes, the second one gets updated as well) The file…
eugene
  • 39,839
  • 68
  • 255
  • 489
1
vote
1 answer

django-imagekit get model attribute

I have the following model: class PropertyPhoto(models.Model): property = models.ForeignKey('Property') photo_show = ProcessedImageField(upload_to=get_web_watermark, processors=[Watermark()], …
Bih Cheng
  • 655
  • 1
  • 13
  • 28
1
vote
0 answers

getattr throws TypeError on ImageSpecField

class MyModel(models.Model): ... original_image = models.ImageField(upload_to=upload_image_to) thumbnail = ImageSpecField( processors=thumbnail_processors, source='original_image', format='PNG' ) ... obj…
demux
  • 4,544
  • 2
  • 32
  • 56
1
vote
3 answers

django-imagekit - thumbnail field not getting serialized

I have following problem: I'm writing an AJAX view in django that serves JSON data about image list from a model that uses ImageSpecField from django-imagekit extension: class Image(models.Model): title = models.CharField(max_length=120) img =…
Konrad Wąsowicz
  • 422
  • 2
  • 6
  • 12
1
vote
1 answer

Django: Is there a way to detect if uploaded image is landscape or portrait?

I want to write a method which detects the orientation of uploaded image, then use a thumb with certain landscape or portrait dimensions using django-imagekit. Any ideas? class Photo(models.Model): title = models.CharField(max_length=200) photo =…
maremare
  • 414
  • 1
  • 4
  • 19
1
vote
1 answer

ImageKit async error - can't decode message body

I'm using Django 1.6 and Django-ImageKit 3.2.1. I'm trying to generate images asynchronously with ImageKit. Async image generation works locally but not on the production server. I'm using Celery and I've tried…
user2616836
1
vote
0 answers

Image will not save or show using django-imagekit

Having an issue with generating a specific image to appear after I have loaded it from my desktop for my users setting. When I press save, the image does not appear, nor save in my database for the specific user. I would like for the image to appear…
Amechi
  • 742
  • 3
  • 11
  • 32
1
vote
1 answer

Problem saving photos in a view using django-imagekit

I'm using this code in one of my views: if request.method == 'POST': vehicle = VehicleForm(request.POST or None) photos = PhotosFormSet(request.POST or None) if vehicle.is_valid(): vehicle.save() photos =…
Stephen
  • 5,959
  • 10
  • 33
  • 43
1
vote
1 answer

Output location of images for django-imagekit

I'm trying to output a list of images that belong to each record in my app as below: pri_photo = vehicle.images.all()[:1] sec_photos = vehicle.images.all()[1:] This first part is OK. The part I'm having issues with is when I…
Stephen
  • 5,959
  • 10
  • 33
  • 43
1
vote
3 answers

django imagekit: set ProcessedImageField from image url

I have got an image url and I want to set a ProcessedImageField attribute from it during object saving. So far I have got this: class Video(Media): url = models.URLField('url', max_length=256, default='') embed_url =…
clime
  • 8,695
  • 10
  • 61
  • 82