Add maxwidth paramater to embed function