Use twigs builtin filter to inline data urls, instead of a custom one.

This commit is contained in:
Jan Böhmer 2020-05-07 23:35:20 +02:00
parent f64910374f
commit d8adc26b03
8 changed files with 83 additions and 66 deletions

View file

@ -3,7 +3,7 @@
{{ element.lines | raw }}
</div>
<div class="C39-container" style="">
<img class="C39" src="{{ inlineData(element.barcode, 'image/svg+xml') }}" height="30px">
<img class="C39" src="{{ element.barcode | data_uri(mime='image/svg+xml') }}" height="30px">
<span class="C39-text">{{ element.barcode_content }}</span>
</div>
</div>

View file

@ -3,7 +3,7 @@
<div class="col-5">
<div class="qr-container">
<a href="{{ element.barcode_content }}">
<img class="qr" src="{{ inlineData(element.barcode, 'image/svg+xml') }}" width="100%" style="">
<img class="qr" src="{{ element.barcode | data_uri(mime='image/svg+xml') }}" width="100%" style="">
</a>
</div>
{#{{ element.barcode | raw }} #}