I am trying to get ImageField absolute path in Django view so I can open the image, write on it something and then serve it to user.
I have problem getting absolute path for the image which is saved in media folder.
item = get_object_or_404(Item, pk=pk)
absolute_url = settings.MEDIA_ROOT + str(item.image.path)
I get error, that item.image does not have path (The 'banner' attribute has no file associated with it.
). item.image is ImageField and I'd like to know how to get absolute path of the image saved in image field (within Django view).