render accepts JSON with width, height, margins key