Most of the magic happens here
Check out v1, v2.1 and v3 commits
v1 is a simple <img src="..." />
w/ gradient border, but without white sub-border (1 node)
v2.1 is a div, :after & backgroundImage (2 nodes)
v3 is an img in 2 nested divs (3 nodes)
Instagram itself draws gradient border in canvas.
This project was bootstrapped with Create React App.