fix(image-with-blur): Set width, height in CSS
This commit is contained in:
parent
e30161b222
commit
cb7bea27ea
1 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
|||
{%- set res = frappe.utils.get_thumbnail_base64_for_image(src) if src else false -%}
|
||||
{%- if res and res['base64'].startswith('data:') -%}
|
||||
<img src="{{ res['base64'] }}" class="image-with-blur {{ resolve_class(class) }}"
|
||||
alt="{{ alt or '' }}" width="{{ res['width'] }}" height="{{ res['height'] }}" data-src="{{ src or '' }}" />
|
||||
data-src="{{ src or '' }}" alt="{{ alt or '' }}"
|
||||
width="{{ res['width'] }}" height="{{ res['height'] }}"
|
||||
style="width: {{ res['width'] }}px; height: {{ res['height'] }}px;" />
|
||||
{%- else -%}
|
||||
<img src="{{ src or '' }}" class="{{ resolve_class(class) }}" alt="{{ alt or '' }}" />
|
||||
{%- endif -%}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue