{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans 'Upload a new photo' %} - Libravatar{% endblock title %}

{% block header %}<link rel="prefetch" href="/css/jcrop.css">
<link rel="prefetch" href="/js/jcrop.js">{% endblock header %}

{% block content %}

<h1>{% trans 'Upload a new photo' %}</h1>

<form enctype="multipart/form-data" action="{% url libravatar.account.views.upload_photo %}" method="post">{% csrf_token %}

{{ form.photo.errors }}
<p class="aligned wide">{{ form.photo.label_tag }}: <input id="id_photo" type="file" name="photo" accept="image/jpeg,image/png">
<br>{% blocktrans with max_file_size|filesizeformat as max_size %}Maximum file size of {{ max_size }}.{% endblocktrans %}</p>

<ul class="conditions">
  <li>{{ form.not_porn.errors }}{{ form.not_porn }} <label for="id_not_porn">{{ form.not_porn.label }}</label></li>
  <li>{{ form.can_distribute.errors }}{{ form.can_distribute }} <label for="id_can_distribute">{{ form.can_distribute.label }}</label></li>
</ul>

<p><input type="submit" value="{% trans 'Upload' %}" />
&nbsp;<a href="{% url libravatar.account.views.profile %}">{% trans 'Cancel' %}</a></p>

</form>

{% endblock content %}

{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans 'Upload a new photo' %} - Libravatar{% endblock title %}

{% block header %}<link rel="prefetch" href="/css/jcrop.css">
<link rel="prefetch" href="/js/jcrop.js">{% endblock header %}

{% block content %}

<h1>{% trans 'Upload a new photo' %}</h1>

<form enctype="multipart/form-data" action="{% url libravatar.account.views.upload_photo %}" method="post">{% csrf_token %}

{{ form.photo.errors }}
<p class="aligned wide">{{ form.photo.label_tag }}: <input id="id_photo" type="file" name="photo" accept="image/*">
<br>{% blocktrans with max_file_size|filesizeformat as max_size %}Maximum file size of {{ max_size }}.{% endblocktrans %}</p>

<ul class="conditions">
  <li>{{ form.not_porn.errors }}{{ form.not_porn }} <label for="id_not_porn">{{ form.not_porn.label }}</label></li>
  <li>{{ form.can_distribute.errors }}{{ form.can_distribute }} <label for="id_can_distribute">{{ form.can_distribute.label }}</label></li>
</ul>

<p><input type="submit" value="{% trans 'Upload' %}" />
&nbsp;<a href="{% url libravatar.account.views.profile %}">{% trans 'Cancel' %}</a></p>

</form>

{% endblock content %}

Change the file input on upload page to hopefully match the camera API
Change the file input on upload page to hopefully match the camera API

https://hacks.mozilla.org/2012/04/taking-pictures-with-the-camera-api-part-of-webapi/
