[Answer]-Use ImagField from Django to save image paths in different directory other than MEDIA_ROOT

1👍

✅

You can do it by defining custom file storage:

from django.core.files.storage import FileSystemStorage

image_store = FileSystemStorage(location='/tmp/images')

class YourModel(models.Model):
      image = models.ImageField(storage=image_store)

Leave a comment