Add this code to set the height or width.
A Shopify merchant wants to display product variants as separate products while also showing related color/style options on each product page, similar to a reference site. They’re using the Dawn theme and initially tried implementing this with custom Liquid code but encountered issues with section vs. block placement.
Solution Provided:
main-product.liquid to add a custom block typeproduct-separate-variant with specific Liquid codeTechnical Issues Resolved:
image_url filter (resolved by adding CSS for height/width)Status: The original poster successfully implemented the solution with guidance from @devmont-digital. Several app developers later suggested automated alternatives (Variant Robot, Product as Variants, Stamp – Collection Variants) for merchants seeking no-code solutions.
Add this code to set the height or width.