Do not convert width and height URL parameters of product image into boolean

Since 8cba7039bc3c there are 2 new arguments w and h.

Closes #12745
This commit is contained in:
Cédric Krier
2023-11-14 15:07:54 +01:00
parent 84d4f09f56
commit 4344f77ac5
+6
View File
@@ -48,10 +48,16 @@ class ImageURLMixin:
}))
if args:
size = args.pop('s', None)
width = args.pop('w', None)
height = args.pop('h', None)
index = args.pop('i', None)
args = {k: int(bool(v)) for k, v in args.items()}
if size:
args['s'] = size
if width:
args['w'] = width
if height:
args['h'] = height
if index is not None:
args['i'] = index
url += '?' + urlencode(args)