diff --git a/ippisite/ippidb/templates/compound_card.html b/ippisite/ippidb/templates/compound_card.html
index 9b1c5e0f063e357ddd5748eecc722b7c65f41a99..19ee66094b276e7ebef22974fb79a3d78639475b 100644
--- a/ippisite/ippidb/templates/compound_card.html
+++ b/ippisite/ippidb/templates/compound_card.html
@@ -579,7 +579,7 @@
 {% endif %}
 "@type": "MolecularEntity",
 {% if compound.chembl_id %}
-"image": "https://www.ebi.ac.uk/chembl/api/data/image/{{chembl_id}}.svg",
+"image": "https://www.ebi.ac.uk/chembl/api/data/image/{{ compound.chembl_id }}.svg",
 {% endif %}
 {% if compound.canonical_smile %}
 "smiles": [