I am storing links of these images as I need to show them on the frontend,
not connected to any user.

But I have done what you are talking about too.
So Django gives you a Model File Field. Add that to your Model. That will
allow you to save and store files. While saving a model object, just use
the above code to compress the images.

You can find about FileField and how to use it from here
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.FileField



On Fri, Jun 3, 2016 at 10:53 PM ivan77 <[email protected]> wrote:

> Hi Ketan,
>
> Thanks for the information!
>
> How is it that you keep the images associated with other tables in the
> database?
>
> What I am specifically thinking about is if you want to associate specific
> images with specific users who uploaded, for example?  Some kind of bridge
> (many to many table)?
>
> Ivan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/bc43f2b0-9527-407b-b66f-774ad97d565c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/bc43f2b0-9527-407b-b66f-774ad97d565c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACyRkBXgUQUpHy1LearXu7qNhRBcxAB47ca24jO4P7sKq%3DVLOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to