About Using WebP Images

For browser compatibility, use the new web-optimized WebP images together with a fallback version in a <picture> tag:

{% load static %}
<picture>
  <source type="image/webp" 
    srcset="{% static 'site/img/logo.webp' %}" />
  <source type="image/png" 
    srcset="{% static 'site/img/logo.png' %}" />
  <img src="{% static 'site/img/logo.png' %}" 
    loading="lazy" alt="Logo" />
</picture>

Tips and Tricks User Experience Web Design Development Django 4.2 Django 3.2 Django 2.2 HTML5

Django/Python Consulting

If you have a specific Django challenge or integration you'd like to solve, I'd be happy to help. Book a free 30-minute call to discuss your project, see if we're a good fit, and explore the best approach for your needs. After the call, you'll receive a tailored cost estimate based on what we discuss.