I am using django easy_thumbnail in a project and I follow the instructions step by step. But i turns out that the url is not returned.
The model containing imageField is:
class Project(models.Model):
name = models.CharField(max_length=100)
description = models.CharField(max_length=2000)
startDate = models.DateField(auto_now_add=True)
photo = models.ImageField(upload_to="projectimg/", null=True, blank=True)
And in the setting, i specify:
THUMBNAIL_ALIASES = {
'': {
'avatar': {'size': (50, 50), 'crop': True},
},
}
And I use the template filter:
<div class="image">
<img src="{{ MEDIA_URL }}{{ project.photo|thumbnail_url:'avatar'}}" class="img-responsive" alt="{{ project.name }}">
</div>
However, the filter seems not returning any thing. Is it because that the url is not found? Or other reasons? Thanks for your time!