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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user