Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django ImageField widget that accepts upload or external link as source

Is there a Django widget for ImageFields that provides the option to either upload an image or provide a url?

I'm thinking like Summernote does (if you click the image icon) in its examples

I've browsed through many apps and they are all focused on just uploading and thumbnailing.

EDIT

Still working on trying to do be able to do this. I'm looking for something like the way django-summernote allows you to add images.

Also taking a look at this question about saving an image link into an ImageField. How can I get both to work together ina widget like Summernote?

Django save image from url and connect with ImageField

like image 891
43Tesseracts Avatar asked Dec 24 '16 23:12

43Tesseracts


1 Answers

ImageFields based on FileField and can save only path to file with current media backend.

For save image from external url you should get link in separately form field and download this picture in tmp file and save to ImageFields.

like image 198
Oleksandr Avatar answered Sep 21 '22 15:09

Oleksandr