diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py
index 3f0146cf0..b0bc3ac2b 100644
--- a/sapl/parlamentares/views.py
+++ b/sapl/parlamentares/views.py
@@ -17,6 +17,7 @@ from django.utils.translation import ugettext_lazy as _
from django.views.decorators.clickjacking import xframe_options_exempt
from django.views.generic import FormView
from django.views.generic.edit import UpdateView
+from image_cropping.utils import get_backend
from sapl.base.forms import SessaoLegislativaForm
from sapl.base.models import Autor
@@ -1027,7 +1028,16 @@ def altera_field_mesa_public_view(request):
partido_parlamentar_sessao_legislativa(sessao,
parlamentar))
if parlamentar.fotografia:
- lista_fotos.append(parlamentar.fotografia.url)
+ thumbnail_url = get_backend().get_thumbnail_url(
+ parlamentar.fotografia,
+ {
+ 'size': (128, 128),
+ 'box': parlamentar.cropping,
+ 'crop': True,
+ 'detail': True,
+ }
+ )
+ lista_fotos.append(thumbnail_url)
else:
lista_fotos.append(None)
diff --git a/sapl/templates/parlamentares/parlamentar_perfil_publico.html b/sapl/templates/parlamentares/parlamentar_perfil_publico.html
index 7a95b40fa..1ba3e846b 100644
--- a/sapl/templates/parlamentares/parlamentar_perfil_publico.html
+++ b/sapl/templates/parlamentares/parlamentar_perfil_publico.html
@@ -2,6 +2,8 @@
{% load i18n %}
{% load common_tags %}
+{% load cropping%}
+
{% block base_content %}
@@ -14,15 +16,13 @@
{% if parlamentar.fotografia %}
-
-
{% endblock detail_content %}
diff --git a/sapl/templates/parlamentares/parlamentares_list.html b/sapl/templates/parlamentares/parlamentares_list.html
index 43627a9ad..88ad4acfe 100644
--- a/sapl/templates/parlamentares/parlamentares_list.html
+++ b/sapl/templates/parlamentares/parlamentares_list.html
@@ -44,7 +44,9 @@
{% if forloop.first %}
{% if obj.fotografia %}
-
+
+
+
{% endif %}
|
{% endif %}
diff --git a/sapl/templates/parlamentares/public_composicaomesa_form.html b/sapl/templates/parlamentares/public_composicaomesa_form.html
index e50a0458e..5981adffc 100644
--- a/sapl/templates/parlamentares/public_composicaomesa_form.html
+++ b/sapl/templates/parlamentares/public_composicaomesa_form.html
@@ -31,7 +31,7 @@
-