Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 742
Vladimir Nani Avatar asked Feb 22 '23 02:02

Vladimir Nani


1 Answers

I'm using ImageKit 2 (alpha) - with S3 just fine.

Using django-storages http://django-storages.readthedocs.org/en/latest/index.html

in my settings:

INSTALLED_APPS = (
   ...,
   'storages',
   ...
)

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'

# stops IK checking S3 all the time - main reason to use IK v2 for me
IMAGEKIT_DEFAULT_IMAGE_CACHE_BACKEND = 'imagekit.imagecache.NonValidatingImageCacheBackend' 
like image 185
Guy Bowden Avatar answered Mar 06 '23 05:03

Guy Bowden