{% load wagtailimages_tags %} {% if item_a != item_b %} {% if item_a and item_b %} {# Image has changed #}