How to get an ImageField URL within a template?

What you need is {{ image.image.url }} & {{ image.image.path }}, while {{ image }} – just an Image object, instance of the defined model and {{ image.image }} gets us to the field which is ImageField object and provides all the specified attributes.

Leave a Comment