From 08f6069124a7e0da6ca9d29757597ee8b5aca3d9 Mon Sep 17 00:00:00 2001 From: Mark Janiczak Date: Wed, 17 Apr 2019 13:25:43 +1000 Subject: [PATCH] Added srcset tags to product thumbnails There is a point just beneath the xs bootstrap 4 breakpoint (<576px) where the product thumbnail images are pixelated due to being too large. The srcset tag accomodates for this point and also retina devices where the ppi is much higher (2x). --- src/templates/thumbs/product/box.template.html | 4 +++- src/templates/thumbs/product/list.template.html | 4 +++- src/templates/thumbs/product/template.html | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/templates/thumbs/product/box.template.html b/src/templates/thumbs/product/box.template.html index 3c69ffe7..e809e973 100644 --- a/src/templates/thumbs/product/box.template.html +++ b/src/templates/thumbs/product/box.template.html @@ -3,7 +3,9 @@
- [@model@] + [%set [@thumb@] %][%asset_url type:'product' thumb:'thumb' id:'[@SKU@]'%][%param default%][%cdn_asset html:'0' library:'images'%]default_product.gif[%/cdn_asset%][%end param%][%/asset_url%][%/set%] + [%set [@thumbL@] %][%asset_url type:'product' thumb:'thumbL' id:'[@SKU@]'%][%param default%][%cdn_asset html:'0' library:'images'%]default_product.gif[%/cdn_asset%][%end param%][%/asset_url%][%/set%] + [@model@] [%if [@inpromo@]%]
On Sale
diff --git a/src/templates/thumbs/product/list.template.html b/src/templates/thumbs/product/list.template.html index 52edcb8b..5d5d2765 100644 --- a/src/templates/thumbs/product/list.template.html +++ b/src/templates/thumbs/product/list.template.html @@ -7,7 +7,9 @@