Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Add alt text to images

Project description

Generic alt text model associated to files by their path.


  1. Install via pip: pip install django-alttext.
  2. Add alttext to your INSTALLED_APPS.
  3. Run migrations.
  4. Optionally follow the integration instructions that apply to your case.


Using one of the supported integrations staff users will be able to add alt text for images in the admin interface. The app stores a list of alt texts by their associated image path.

In your templates, you can now access the alt text for any file using the alttext filter:

{% load alttext_tags %}
<img src="{{ mymodel.imagefield }}" alt="{{ mymodel.imagefield|alttext }}" >

Mezzanine integration

If you’re using Mezzanine and filebrowser-safe, add alttext.mezzanine to your INSTALLED_APPS before mezzanine.boot to enable alt-text links in the admin. A link to “Edit alt text” will appear next to each FileField in Add and Change forms.


  • Enable the admin list view to manage all AltText instances: settings.ALTTEXT_ADMIN_DISPLAY = True.


Review contribution guidelines at

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-alttext, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_alttext-1.1.1-py2.py3-none-any.whl (9.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-alttext-1.1.1.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page