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
17
votes
2 answers

Django easy-thumbnails vs sorl-thumbnail differences

I've been reading about and trying various thumbnailing apps for Django. These are the requirements: All generated thumbnails must be saved in a S3 bucket separate from the original images, i.e. separate storage class When the image instance is…
davidtgq
  • 3,780
  • 10
  • 43
  • 80
13
votes
3 answers

Change saturation with Imagekit, PIL or Pillow?

How do I go about changing the saturation of an image using PIL or Pillow? Preferably I'd like to be able to use the solution together with the django-imagekit package. The reason I need to change the saturation is to create an effect where when the…
antonagestam
  • 4,532
  • 3
  • 32
  • 44
11
votes
1 answer

Django ImageField default

models.py: class UserProfile(models.Model): photo = models.ImageField(upload_to = get_upload_file_name, storage = OverwriteStorage(), default =…
Mihai Zamfir
  • 2,167
  • 4
  • 22
  • 37
11
votes
3 answers

Stopping auto-rotation of images in Django-imagekit Thumbnail

I've got a thumbnail filter that always ends up rotating the image 90 degrees to the left when the image is taller than it is wide (I've checked, and the original image is straight, while the cached image is rotated). The relevant code looks like…
timesuji
  • 131
  • 1
  • 5
8
votes
2 answers

AttributeError : type object '_io.StringIO' has no attribute 'StringIO'

In my model I want to format the imagefield by overridding the save method I have done this in my model from PIL import Image as Img from io import StringIO from django.core.files.uploadedfile import InMemoryUploadedFile class Blog(models.Model): …
Niladry Kar
  • 1,163
  • 4
  • 20
  • 50
6
votes
1 answer

Python-Django How to use django-ajax-uploader in admin?

I have searched a lot on this with no luck to find an exact answer. I want to use django-ajax-uploader inside admin's edit form. I have a model with an image field. In admin side i am excluding that field and inserting the ajax-uploader into the…
ratata
  • 1,129
  • 14
  • 42
5
votes
2 answers

How to convert an image to a specific file size?

I am working with Pillow, Django, and django-imagekit. I am looking to be able to have a profile picture model field (probably using the ProcessedImageField class from imagekit) that will take any image, convert to JPEG, crop it to 150x150, and make…
dcgoss
  • 2,147
  • 3
  • 20
  • 31
5
votes
3 answers

Resizing images on the server

We just implemented a feature where our users can upload photos. We are re-sizing what the user has uploaded into thumbnail and an 800x600 "display" size. The problem we are having is that this operation seems to be taking up a lot of memory on our…
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
4
votes
2 answers

How to integrate imagekit with S3

I would like to upload from django admin app photos to S3 and associate them with my model. I have found imagekit very appropriate for this. How can I configure imegekit to upload photos to S3 server?
Vladimir Nani
  • 2,774
  • 6
  • 31
  • 52
4
votes
1 answer

django-imagekit - better way of showing a default image?

I'm using django-imagekit to resize my user avatars and right now to display a default avatar (if the user didn't upload his/her avatar) I do this: views.py try: usr_avatar = UsrAvatar.objects.get(user=request.user.id) except…
avatar
  • 12,087
  • 17
  • 66
  • 82
4
votes
2 answers

Caught DoesNotExist while rendering: Photo matching query does not exist

When I do the following inside an admin file: photo = Photo.objects.get(original_image__exact=file_name) val = photo.admin_thumbnail.url I get this error: Caught DoesNotExist while rendering: Photo matching query does not exist. Here is my…
demux
  • 4,544
  • 2
  • 32
  • 56
4
votes
2 answers

Django model inheritance overriding a variable used in field attribute

I am trying to override some default values in a inherited Django model. I have a bunch of different image sizes for models I need and the fields needed are 90% the same. I have tried creating a base model to use and was going to add any additional…
mikes000
  • 678
  • 6
  • 11
4
votes
2 answers

Integrating Photologue

I want to integrate photologue with my Django app and use it to display photos in a vehicle inventory...kinda like what is offered by Boost Motor Group Inc. I've already integrated the app so the next step which I'm trying to figure out is how to…
Stephen
3
votes
3 answers

I/O operation on closed file in django with 'ImageKit'

In my django project I am using ImageKit to size my profile images. I have a model with these fields: pasfoto = models.ImageField(upload_to='images/', blank=True) pasfoto_thumbnail = ImageSpecField(source='pasfoto', …
MDekker
  • 443
  • 1
  • 4
  • 19
3
votes
1 answer

Creating video thumbnails with imagekit and opencv

I have a model named "Post", which is going to refer to images and videos. I added ImageSpecField for thumbnail storage and created a function, that pulls the desired frame from uploaded video. Is there any way to use this function while generating…
Rud Ein
  • 73
  • 7
1
2 3
9 10