From cb7bea27eabec876b6fbde8ccf33ecd755bdc2f4 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 13 Jul 2020 13:31:52 +0530 Subject: [PATCH] fix(image-with-blur): Set width, height in CSS --- frappe/templates/includes/image_with_blur.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/templates/includes/image_with_blur.html b/frappe/templates/includes/image_with_blur.html index 20b0380b88..dbddb9d8ef 100644 --- a/frappe/templates/includes/image_with_blur.html +++ b/frappe/templates/includes/image_with_blur.html @@ -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:') -%} {{ alt or '' }} + data-src="{{ src or '' }}" alt="{{ alt or '' }}" + width="{{ res['width'] }}" height="{{ res['height'] }}" + style="width: {{ res['width'] }}px; height: {{ res['height'] }}px;" /> {%- else -%} {{ alt or '' }} {%- endif -%}