Fixes typo
Changes url passed to embed generation

The url used was the original file url, not the output url.
Unencapsulates embed source generation